Cleaning robot and operation thereof

ABSTRACT

Some embodiments include a robot, including: a chassis; a set of wheels coupled to the chassis; at least one encoder coupled to a wheel with a resolution of at least one count for every ninety degree rotation of the wheel; a trailing arm suspension coupled to each drive wheel for overcoming surface transitions and obstacles, wherein a first suspension arm is positioned on a right side of a right drive wheel and a second suspension arm is positioned on a left side of a left drive wheel; a roller brush; a collection bin; a fan with multiple blades for creating a negative pressure resulting in suction of dust and debris; a network card for wireless communication with at least one of: a computing device, a charging station, and another robot; a plurality of sensors; a processor; and a media storing instructions that when executed by the processor effectuates robotic operations.

FIELD OF THE DISCLOSURE

This application is a Continuation in Part of U.S. Non-Provisional application Ser. No. 15/444,966, filed Feb. 28, 2017, which claims the benefit of U.S. Provisional Patent Application Nos. 62/302,920, filed Mar. 3, 2016, and 62/342,987, filed May 29, 2016, each of which is hereby incorporated by reference. This application claims benefit to U.S. Provisional Patent Application Nos. 62/772,026, filed Nov. 27, 2018, 62/774,420, filed Dec. 3, 2019, 62/914,190, filed Oct. 11, 2019, and 62/933,882, filed Nov. 11, 2019, each of which is hereby incorporated by reference.

In this patent, certain U.S. patents, U.S. patent applications, or other materials (e.g., articles) have been incorporated by reference. Specifically, U.S. patent application Ser. Nos. 15/272,752, 15/949,708, 16/277,991, 16/048,179, 16/048,185, 16/163,541, 16/163,562, 16/163,508, 16/185,000, 16/051,328, 15/449,660, 16/041,286, 16/422,234, 14/673,633, 15/676,888, 16/163,530, 16/297,508, 16/418,988, 15/614,284, 15/425,130, 15/955,344, 15/243,783, 15/954,335, 15/954,410, 15/257,798, 15/224,442, 15/683,255, 15/048,827, 14/817,952, 15/619,449, 16/198,393, 15/986,670, 15/447,623, 15/951,096, 16/270,489, 16/130,880, 14/948,620, 16/239,410, 16/230,805, 15/447,122, 16/393,921, 16/389,797, 16/509,099, 16/389,797, and 16/427,317, are hereby incorporated by reference. The text of such U.S. patents, U.S. patent applications, and other materials is, however, only incorporated by reference to the extent that no conflict exists between such material and the statements and drawings set forth herein. In the event of such conflict, the text of the present document governs, and terms in this document should not be given a narrower reading in virtue of the way in which those terms are used in other materials incorporated by reference.

FIELD OF THE DISCLOSURE

The disclosure relates to autonomous robots.

BACKGROUND

Autonomous or semi-autonomous robotic devices are increasingly used within consumer homes and commercial establishments. Such devices may include a robotic vacuum cleaner, lawn mower, mop, or other similar devices. To operate autonomously or to operate with minimal (or less than fully manual) input and/or external control within a working environment, mapping, localization, and path planning methods may be such that robotic devices may autonomously create a map of the working environment, subsequently use the map for navigation, and devise intelligent path plans and task plans for efficient navigation and task completion.

BRIEF DESCRIPTION OF DRAWINGS

FIGS. 1A and 1B illustrate an example of a robot, according to some embodiments.

FIG. 2 illustrates a front elevation view of an expandable wheel in a contracted position, according to some embodiments.

FIG. 3 illustrates a perspective view of an expandable wheel in a contracted position, according to some embodiments.

FIG. 4 illustrates a perspective view of an expandable wheel in an expanded position, according to some embodiments.

FIG. 5 illustrates a perspective view of a cutaway of an expandable wheel in an expanded position, according to some embodiments.

FIG. 6A illustrates a cutaway of an expandable wheel in a contracted position, according to some embodiments.

FIG. 6B illustrates a cutaway of an expandable wheel in an expanded position, according to some embodiments.

FIG. 7 illustrates a perspective view of an expandable wheel with angled rollers in a contracted position, according to some embodiments.

FIG. 8 illustrates a front elevation view of an expandable wheel with angled rollers in a contracted position, according to some embodiments.

FIG. 9 illustrates a perspective view of an expandable wheel with angled rollers in an expanded position, according to some embodiments.

FIG. 10 illustrates a perspective view of a cutaway of an expandable wheel with angled rollers in an expanded position, according to some embodiments.

FIG. 11A illustrates a cutaway of an expandable wheel with angled rollers in a contracted position, according to some embodiments.

FIG. 11B illustrates a cutaway of an expandable wheel with angled rollers in an expanded position, according to some embodiments.

FIG. 12 illustrates the difference in circumference between an expandable wheel in an expanded position and a contracted position, according to some embodiments.

FIG. 13A illustrates a perspective view of a cutaway of an expandable wheel in a contracted position, according to some embodiments.

FIG. 13B illustrates a perspective view of a cutaway of an expandable wheel in a position between maximum contracted and maximum expanded positions, according to some embodiments.

FIG. 14 illustrates a perspective view of a cutaway of an expandable wheel and an example of a mechanism that may be used for expanding and contracting the wheel, according to some embodiments.

FIG. 15 illustrates an example of an underside of a robotic cleaner, according to some embodiments.

FIGS. 16A-16D illustrate examples of different positions and orientations of floor sensors, according to some embodiments.

FIGS. 17A and 17B illustrate examples of different positions and types of floor sensors, according to some embodiments.

FIG. 18 illustrates an example of an underside of a robotic cleaner, according to some embodiments.

FIG. 19 illustrates an example of an underside of a robotic cleaner, according to some embodiments.

FIG. 20 illustrates an example of an underside of a robotic cleaner, according to some embodiments.

FIGS. 21A-21H illustrate an example of a brush compartment, according to some embodiments.

FIGS. 22A and 22B illustrate an example of a brush compartment, according to some embodiments.

FIGS. 23A and 23B illustrate how an overlapping area is detected in some embodiments using raw pixel intensity data and the combination of data at overlapping points.

FIGS. 24A-24C illustrate how an overlapping area is detected in some embodiments using raw pixel intensity data and the combination of data at overlapping points.

FIG. 25 illustrates an example of a multidimensional map.

FIG. 26 illustrates replacing a value of a reading with an average of the values of neighboring readings.

FIGS. 27A-27C illustrate generating a map from a subset of measured points.

FIG. 28A illustrates the robot measuring the same subset of points over time.

FIG. 28B illustrates the robot identifying a single particularity as two particularities.

FIG. 29 illustrates a path of the robot.

FIGS. 30A-30D illustrate an example of determining a perimeter.

FIG. 31 illustrates example of perimeter patterns.

FIG. 32 illustrates the use of a motion filter.

FIGS. 33A and 33B illustrate vertical alignment of images.

FIG. 34 illustrates overlap of data at perimeters.

FIG. 35 illustrates overlap of data.

FIG. 36 illustrates the lack of overlap between data.

FIG. 37 illustrates a path of a robot and overlap that occurs.

FIG. 38 illustrates the resulting spatial representation based on the path in FIG. 37 .

FIG. 39 illustrates the spatial representation that does not result based on the path in FIG. 37 .

FIG. 40 illustrates a movement path of a robot.

FIG. 41 illustrates a sensor of a robot observing the environment.

FIG. 42 illustrates a sensor of a robot observing the environment.

FIG. 43 illustrates a sensor of a robot observing the environment.

FIG. 44 illustrates an incorrectly predicted perimeter.

FIG. 45 illustrates an example of a connection between a beginning and end of a sequence.

FIG. 46A illustrates an example of an initial phase space probability density of a robotic device, according to some embodiments.

FIGS. 46B-46D illustrate examples of the time evolution of the phase space probability density, according to some embodiments.

FIGS. 47A-47D illustrate examples of initial phase space probability distributions, according to some embodiments.

FIGS. 48A and 48B illustrate examples of observation probability distributions, according to some embodiments.

FIG. 49 illustrates an example of a map of an environment, according to some embodiments.

FIGS. 50A-50C illustrate an example of an evolution of a probability density reduced to the q₁, q₂ space at three different time points, according to some embodiments.

FIGS. 51A-51C illustrate an example of an evolution of a probability density reduced to the p₁, q₁ space at three different time points, according to some embodiments.

FIGS. 52A-52C illustrate an example of an evolution of a probability density reduced to the p₂, q₂ space at three different time points, according to some embodiments.

FIG. 53 illustrates an example of a map indicating floor types, according to some embodiments.

FIG. 54 illustrates an example of an updated probability density after observing floor type, according to some embodiments.

FIG. 55 illustrates an example of a Wi-Fi map, according to some embodiments.

FIG. 56 illustrates an example of an updated probability density after observing Wi-Fi strength, according to some embodiments.

FIG. 57 illustrates an example of a wall distance map, according to some embodiments.

FIG. 58 illustrates an example of an updated probability density after observing distances to a wall, according to some embodiments.

FIGS. 59-62 illustrate an example of an evolution of a probability density of a position of a robotic device as it moves and observes doors, according to some embodiments.

FIG. 63 illustrates an example of a velocity observation probability density, according to some embodiments.

FIG. 64 illustrates an example of a road map, according to some embodiments.

FIGS. 65A-65D illustrate an example of a wave packet, according to some embodiments.

FIGS. 66A-66E illustrate an example of evolution of a wave function in a position and momentum space with observed momentum, according to some embodiments.

FIGS. 67A-67E illustrate an example of evolution of a wave function in a position and momentum space with observed momentum, according to some embodiments.

FIGS. 68A-68E illustrate an example of evolution of a wave function in a position and momentum space with observed momentum, according to some embodiments.

FIGS. 69A-69E illustrate an example of evolution of a wave function in a position and momentum space with observed momentum, according to some embodiments.

FIGS. 70A and 70B illustrate an example of an initial wave function of a state of a robotic device, according to some embodiments.

FIGS. 71A and 71B illustrate an example of a wave function of a state of a robotic device after observations, according to some embodiments.

FIGS. 72A and 72B illustrate an example of an evolved wave function of a state of a robotic device, according to some embodiments.

FIGS. 73A, 73B, 74A-74H, and 75A-75F illustrate an example of a wave function of a state of a robotic device after observations, according to some embodiments.

FIGS. 76A and 76B illustrate point clouds representing walls in the environment.

FIGS. 77A and 77B illustrate point clouds representing walls in the environment.

FIG. 78 illustrates seed localization.

FIGS. 79A and 79B illustrate examples of overlap between possible locations of the robot.

FIG. 80 illustrates a map.

FIGS. 81A and 81B illustrate a path of a robot.

FIGS. 82A-82E illustrate a path of a robot.

FIGS. 83A-83C illustrate an example of EKF output.

FIGS. 84 and 85 illustrate an example of a coverage area.

FIG. 86 illustrates an example of a polymorphic path.

FIG. 87 illustrates an example of a traversable path of a robot.

FIG. 88 illustrates an example of a traversable path of a robot.

FIG. 89 illustrates an example of an untraversable path of a robot.

FIG. 90 illustrates an example of a traversable path of a robot.

FIG. 91 illustrates areas traversable by a robot.

FIG. 92 illustrates areas untraversable by a robot.

FIGS. 93A-93D, 94A, 94B, 95A and 95B illustrate how risk level of areas change with sensor measurements.

FIG. 96A illustrates an example of a Cartesian plane used for marking traversability of areas.

FIG. 96B illustrates an example of a traversability map.

FIGS. 97A-97E illustrate an example of path planning.

FIG. 98 illustrates an example of a system notifying a user prior to passing another vehicle.

FIG. 99 illustrates an example of a home network.

FIGS. 100A and 100B illustrate examples of connection path of devices through the cloud.

FIG. 101 illustrates an example of local connection path of devices.

FIG. 102 illustrates direct connection path between devices.

FIG. 103 illustrates an example of local connection path of devices.

FIG. 104 illustrates the use of cache memory.

FIG. 105 illustrates an example of subsystems of a robot.

FIG. 106 is a schematic diagram of an example of a robot with which the present techniques may be implemented in some embodiments.

FIG. 107A illustrates a plan view of an exemplary environment in some use cases.

FIG. 107B illustrates an overhead view of an exemplary two-dimensional map of the environment generated by a processor of a robot in some embodiments.

FIG. 107C illustrates a plan view of the adjusted, exemplary two-dimensional map of the workspace in some embodiments.

FIGS. 108A and 108B illustrate an example of the process of adjusting perimeter lines of a map in some embodiments.

SUMMARY

The following presents a simplified summary of some embodiments of the techniques described herein in order to provide a basic understanding of the invention. This summary is not an extensive overview of the invention. It is not intended to identify key/critical elements of the invention or to delineate the scope of the invention. Its sole purpose is to present some embodiments of the invention in a simplified form as a prelude to the more detailed description that is presented below.

Some embodiments include a robot, including: a chassis; a set of wheels coupled to the chassis; at least one encoder coupled to a wheel with a resolution of at least one count for every ninety degree rotation of the wheel; a trailing arm suspension coupled to each drive wheel for overcoming surface transitions and obstacles, wherein a first suspension arm is positioned on a right side of a right drive wheel and a second suspension arm is positioned on a left side of a left drive wheel; a roller brush; a collection bin for storing dust and debris collected from a surface; a fan with multiple blades for creating a negative pressure resulting in suction of the dust and debris from the surface; a network card for wireless communication with at least one of: a computing device, a charging station, and another robot; a plurality of sensors; a processor; and a non-transitory, machine-readable media storing instructions that when executed by the processor effectuates operations including: establishing, with the processor, a connection with a wireless router during an initial setup of the robot; obtaining, with the processor, a network address from the wireless router during the initial setup of the robot and a renewed network address at intervals determined by the wireless router; establishing, with the processor, a connection with at least one of: the computing device, the charging station, and the another robot; capturing, with at least one sensor, spatial data of an environment of the robot and movement data of the robot; generating or updating, with the processor, a map of the environment based on at least some of the spatial data and at least some of the movement data, including: aligning, with the processor, the at least some of the spatial data captured within different fields of view based on overlap between the at least some of the spatial data captured within the different fields of view; determining, with the processor, a movement distance and a movement direction of the robot from a first position of the robot to a second position of the robot based on at least some of the movement data and data from the at least one encoder; quantizing, with the processor, the map into a collection of cells; assigning, with the processor, at least one value to at least one cell of the map indicating at least one of: a traversability of the at least one cell and coverage of the at least one cell, wherein the traversability is determined based on local sensor data and the coverage indicates whether the at least one cell has been covered by the robot; updating, with the processor, the at least one value of the at least one cell based on data captured by at least one sensor positioned along a perimeter of the robot or on a bottom of the robot as the robot moves in real time; dividing, with the processor, the map into two or more zones; storing, with the processor, at least part of the map in a memory accessible to the processor during a subsequent work session; transmitting, with the processor, the map to an application of a computing device, wherein the application displays a perception of the map; and transmitting, with the processor, at least some information to the cloud.

Some embodiments further include operations including: capturing, with a camera, images of the environment; detecting, with the processor, a pattern in a derivative of the images of the environment; determining, with the processor, a reference of the robot with respect to a coordinate frame of the environment based on the pattern in the derivative of the images; ignoring, with the processor, the spatial data captured while the robot traverses previously covered areas of the map as the robot moves from one area to another; and updating, with the processor, the map based on the reference of the robot with respect to the coordinate frame of the environment and the ignored spatial data. Some embodiments further include operations including: fine tuning, with the processor, the map based on data captured by a depth sensor positioned on the robot with a field of view complementary to a field of view of a camera positioned on the robot. In some embodiments, the depth sensor is a structured light depth sensor. In some embodiments generating or updating the map further includes: removing, with the processor, at least some overlapping spatial data point from the map. Some embodiments further include operations including: actuating, with a control system, movement of the robot along a trajectory of polymorphic instantiations that collectively form a boustrophedon path by applying pulsed electricity to at least one electric motor of the set of wheels. Some embodiments further include operations including: simulating, with the processor, possible locations of the robot using an ensemble; and choosing, with the processor, one element of the ensemble as a new location of the robot based on an assessment of sensor data captured in real time indicative of a location of the robot with respect to the coordinate frame of the environment. In some embodiments, at least some of the movement data is captured by a movement sensor that optically measures the displacement of the robot on a surface by transmitting a wavelength of light in or near the infrared spectrum. In some embodiments, the application of the computing device is configured to execute at least one of: receiving a user input designating at least one of: an amount of surface coverage by the robot before the robot returns to a charging station and an amount of surface coverage or volume of debris collected by the robot before the robot empties the collection bin; and displaying areas covered by the robot in real time. In some embodiments, the robot empties the collection bin based on a frequency a user prefers the collection bin to be emptied. In some embodiments, the robot returns to a charging station after at least one of: a default amount of surface coverage is completed and a default volume of debris is collected. In some embodiments, the collection bin is emptied manually or automatically. In some embodiments, the charging station is a built-in charging station or a portable charging station. In some embodiments, the plurality of sensors includes at least some sensors that are silent activators. In some embodiments, the charging station and the robot wirelessly communicate using a radio frequency of 2.4 or 5 GHz. In some embodiments, the network card encapsulates a payload including information or commands within a framework having a header with at least a specific number that uniquely identifies the network card. In some embodiments, the initial setup of the robot and discovery of available wireless routers is enhanced by Bluetooth capabilities of the network card. In some embodiments, a data packet comprising a payload including commands or information and a header are sent by and between at least two of: the robot, the computing device, the charging station, and the another robot. In some embodiments, the header includes a checksum that is read by a receiving device to confirm that the payload is intact. In some embodiments, at least one of: the robot, the computing device, the charging station, and the another robot are in a local area network or on the cloud. In some embodiments, the robot communicates with the computing device, the charging station, or the another robot in the local area network or a wide area network.

DETAILED DESCRIPTION OF SOME EMBODIMENTS

The present inventions will now be described in detail with reference to a few embodiments thereof as illustrated in the accompanying drawings. In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present inventions. It will be apparent, however, to one skilled in the art, that the present inventions, or subsets thereof, may be practiced without some or all of these specific details. In other instances, well known process steps and/or structures have not been described in detail in order to not unnecessarily obscure the present inventions. Further, it should be emphasized that several inventive techniques are described, and embodiments are not limited to systems implanting all of those techniques, as various cost and engineering trade-offs may warrant systems that only afford a subset of the benefits described herein or that will be apparent to one of ordinary skill in the art.

In some embodiments, a robot may include one or more autonomous or semi-autonomous robotic devices having communication, mobility, actuation and/or processing elements. In some embodiments, a robot includes a vehicle, such as a car or truck, with an electric motor. For example, the robot may include an electric car with an electric motor. In some embodiments, a vehicle, such as a car or truck, with an electric motor includes a robot. For example, an electric car with an electric motor may include a robot powered by an electric motor. In some embodiments, a robot may include, but is not limited to include, one or more of a casing, a chassis including a set of wheels, a motor to drive the wheels, a receiver that acquires signals transmitted from, for example, a transmitting beacon, a transmitter for transmitting signals, a processor, a memory, a controller, tactile sensors, obstacle sensors, network or wireless communications, radio frequency communications, power management such as a rechargeable battery or solar panels or fuel, one or more clock or synchronizing devices, temperature sensors, imaging sensors, and at least one cleaning tool (e.g., impeller, brush, mop, scrubber, steam mop, polishing pad, UV sterilizer, etc.). The processor may, for example, receive and process data from internal or external sensors, execute commands based on data received, control motors such as wheel motors, map the environment, localize the robot, determine division of the environment into zones, and determine movement paths. In some embodiments, at least a portion of the sensors of the robot are provided in a sensor array, wherein the at least a portion of sensors are coupled to a flexible, semi-flexible, or rigid frame. In some embodiments, the frame is fixed to a chassis or casing of the robot. In some embodiments, the sensors are positioned along the frame such that the field of view of the robot is maximized while the cross-talk or interference between sensors is minimized. In some cases, a component may be placed between adjacent sensors to minimize cross-talk or interference.

FIG. 1A illustrates an example of a robot including sensor windows 100 behind which sensors are positioned, sensors 101 (e.g., camera, laser emitter, TOF sensor, IR sensors, range finders, LIDAR, depth cameras, etc.), user interface 102, and bumper 103. FIG. 1B illustrates internal components of the robot including sensors 101 of sensor array 104, PCB 105, wheel modules each including suspension 106, battery 107, floor sensor 108, and wheel 109. In some embodiments, a processor of the robot may use data collected by various sensors to devise, through various phases of processing, a polymorphic path plan.

In some embodiments, the wheels of the robot include a wheel suspension system. In some embodiments, the wheel suspension includes a trailing arm suspension coupled to each wheel and positioned between the wheel and perimeter of the robot chassis. An example of a dual wheel suspension system is described in U.S. patent application Ser. Nos. 15/951,096 and 16/270,489, the entire contents of which are hereby incorporated by reference. Other examples of wheel suspension systems that may be used are described in U.S. patent application Ser. No. 16/389,797, the entire contents of which is hereby incorporated by reference. In some embodiments, the different wheel suspension systems may be used independently or in combination.

In some embodiments, one or more wheels of the robot may be driven by one or more electric motors. In some embodiments, the wheels of the robot are mecanum wheels. In some embodiments, the wheels of the robot are expandable. In some embodiments, the circumference of the wheel may be based on a position of a series of rollers that may be moved radially inward or outward in order to change the size (i.e., circumference) of the wheel. In some embodiments, the rollers may be mounted on linkages connected to spokes. In some embodiments, the spokes may be connected at a first end to a plate positioned within a main housing of the wheel. In some embodiments, an inner shaft housed within a main shaft may be connected to the plate. In some embodiments, the inner shaft may be rotated (e.g., using an electric motor or electromagnetic force) to move the spokes, links, and rollers. In some embodiments, linkages and rollers may be pushed radially outward from the main housing and the wheel may be a most expanded position when a spoke is parallel to a line connecting the center of the plate and the first end of the spoke. In some embodiments, linkages and rollers may be pulled inward towards the main housing and the wheel may be in a most contracted position when a spoke is as near to perpendicular as possible (based on the physical allowance of the particular embodiment) to the line connecting the center of the plate and the first end of the spoke. An expandable wheel is also disclosed in U.S. patent application Ser. No. 15/447,623, the entire contents of which is hereby incorporated by reference.

In some embodiments, the processor of the robot determines when the wheels should be expanded or retracted based on sensor data collected by one or more sensors. For example, data of a sensor monitoring tension on the wheels may be used to determine when to expand the wheel, when, for example, more than a predetermined amount of tension is detected. Similarly, data of a sensor monitoring rate of rotation of a wheel may be used to determine when expand the wheel, when, for example, it is determined that rotation is not concurrent with motor power. It will be obvious to one skilled in the art that the disclosed invention can benefit from any kind of sensing mechanism to detect tension etc.

FIG. 2 illustrates a front elevation view of an expandable wheel 200 in a contracted position. The main housing 201 of the wheel remains in a fixed position while a plurality of rollers 202 disposed around the circumference of the wheel may be pushed outward radially from the center of the wheel to increase the circumference of the wheel. FIG. 3 illustrates a perspective view of expandable wheel 200 in a contracted position. Each roller 202 protrudes slightly through an aperture 203. The main housing 201 of the wheel may remain fixed when the rollers are pushed outward through the apertures to create a larger wheel circumference. A hallow main shaft (not shown) may be attached to the main housing for rotation of the wheel.

FIG. 4 illustrates expandable wheel 200 in an expanded position. The main housing 201 of wheel 200 remained in a fixed position with respect to the rollers 202, which have been pushed radially outward from the center of the wheel through the apertures 203 via spokes within the wheel (not shown). In some embodiments, each roller may be mounted at the end of a pivoting link attached to a spoke and may be rotatable around an axis of the roller. FIG. 5 illustrates a cutaway of the wheel 200. Each roller 202 is mounted on the end of a pivoting linkage 205 connected to a spoke 204. The inner ends of the spokes are connected to a plate 206 to which an inner shaft (not shown) housed within the main shaft may be attached to. When the inner shaft is rotated, the plate 206 positioned within the main housing is rotated relative to the main housing to push the spokes in or out. The inner shaft may be rotated separately from the main shaft in either direction using, for example, electricity or electromagnetic force, which may also be used to lock the inner shaft in place. In some embodiments, the rollers may be rotatable around an axis of the rollers.

FIGS. 6A and 6B illustrate cutaway views of the wheel. In both FIGS. 6A and 6B, a singular spoke, linkage, and roller is illustrated to portray the parts more clearly, however, in practice, each of the apertures 203 include a spoke, linkage, and roller. FIG. 6A illustrates the spoke 204, linkage 205, and roller 202 in a contracted position. The spoke 204 is mounted pivotally by a first end to a plate 206, which is positioned within a cavity at the center of the main housing 201 fit to the plate 206. Plate 206 is held in place by the two sides of the main housing 201 as illustrated in FIGS. 2 and 3 . The inner shaft (not shown) may be attached to plate 206 and may be positioned within a hallow main shaft (not shown) attached to main housing 201 to allow rotation of the inner shaft and attached plate with respect to the main housing. Such rotation may cause the spokes together with the pivoting linkages to work as a crank mechanism and translate the relative rotation of the two parts to a linear movement of the roller outward from the center of the wheel, the aperture working as a guide. As shown in FIG. 6B, this movement results in each spoke, linkage, and roller extending in a radially outward direction 208. When the plate 206 is rotated in direction 207 and moves from the position shown in FIG. 6A to the position shown in FIG. 6B, wherein each spoke is parallel with the corresponding aperture, the spokes and linkages are pushed outward, causing the rollers to protrude further through the apertures. In some embodiments, sleeve 209 may be provided to fit around the apertures to limit the wear of the interacting components. Different types of sleeves may be used. The sleeve may be one piece or several separate pieces used to cover around the apertures.

In some embodiments, the rollers may be positioned with an axis of rotation at approximately 45′ with respect to a plane of the wheel and at approximately 45° to a line parallel to the axis of rotation of the wheel, similar to mecanum wheels. FIG. 7 illustrates a perspective view of wheel 700 with rollers 702 arranged in this manner and in a contracted position. The rollers 702 protrude slightly from apertures 703 in main housing 701. FIG. 8 illustrates a front elevation view of wheel 700 with rollers 702 disposed at approximately 45° to a line parallel to the axis of rotation of the wheel. FIG. 9 illustrates a perspective view of wheel 700 with rollers 702 in an expanded position. The rollers 702 are pushed through the apertures 703 radially outward from the main housing 701. A hollow main shaft (not shown) may be attached to main housing for rotation of the wheel.

FIG. 10 illustrates a cutaway of the wheel 700 with angled rollers 702. Each roller 702 is mounted on the end of a pivoting linkage 705 connected to a spoke 704. The inner ends of the spokes are connected to a plate 706 to which an inner shaft (not shown) may be attached. When the inner shaft is rotated, the plate 706 positioned within the main housing may be rotated relative to the main housing to push the spokes in or out. The inner shaft may be rotated separately from the main shaft in either direction using, for example, electricity or electromagnetic force, which may also be used to lock the inner shaft in place.

FIGS. 11A and 11B illustrate cutaway views of the wheel 700. In FIGS. 11A and 11B, a singular spoke, linkage, and roller is illustrated in order to portray the parts more clearly, however, in practice, for each aperture 703, there is a corresponding spoke, linkage and roller. FIG. 11A illustrates the spoke 704, linkage 705, and roller 702 in a contracted position. The spoke 704 is mounted pivotally by a first end to a plate 706, which is positioned within a cavity at the center of the main housing 701 fit to the plate 706. Plate 706 is held in place by the two sides of the main housing 701 as illustrated in FIGS. 8 and 9 . The inner shaft (not shown) may be attached to plate 706 and may be positioned within a hallow main shaft (not shown) attached to main housing 701 to allow rotation of the inner shaft and attached plate with respect to the main housing. Such rotation may cause the spokes together with the pivoting linkages to work as a crank mechanism and translate the relative rotation of the two parts to a linear movement of the roller outward from the center of the wheel, the aperture working as a guide. As shown in FIG. 11B, this movement results in each spoke, linkage, and roller group extending in a radially outward direction 708. When the plate is rotated in a direction 707, until a point where each spoke is parallel with the corresponding aperture, the spoke and linkage are pushed, causing the roller to protrude further out from the aperture.

FIG. 12 illustrates a side elevation view of a wheel with rollers angled and in an expanded position (1200A) and contracted position (1200B). Lines 1104, 1106 and 1108 are provided for reference. The circumference 1100 of the wheel in the expanded position is greater than the circumference 1102 of the wheel in the contracted position. The diameter of wheel 1200A extends from line 1104 to line 1108, a distance 1110 further than the diameter of wheel 700B, which extends from line 1104 to line 1106. In some embodiments, spokes 1112, linkages 1114, and rollers 1116 may be maintained at any position between a first contracted position, such as the contracted position of wheel 1200B, and a second expanded position, such as the expanded position of wheel 1200A. In some embodiments, wherein spokes 1112, linkages 1114, and rollers 1116 are positioned in the first contracted position (wheel 1200B), spokes 1112 are as close to perpendicular as possible (based on the physical allowance of the particular embodiment however the angle may be greater or less than 90 degrees) with respect to a line 1122 connecting a center of the plate to an end of the respective spoke. For example, angle 1118 of centerline 1120 of a spoke of wheel 1200B is as close to perpendicular with respect to line 1122 of wheel 600B when linkages 1114 and rollers 1116 are pulled by the spokes as closely as possible to the plate. In some embodiments, wherein spokes 1112, linkages 1114, and rollers 1116 are positioned in the second expanded position (wheel 1200A), spokes 1112 are parallel to the line 1122 connecting the center of the plate to the end of the respective spoke. For example, centerline 1124 of a spoke of wheel 1200A is as close to parallel with respect to line 1122 of wheel 1200A when linkages 1114 and rollers 1116 are pushed as far outward from the plate.

FIG. 13A illustrates wheel 1300 with inner shaft 1301 attached to a plate 1302 positioned within the main housing 1303. Main shaft 1304 is hollow and attached to main housing 1303 and inner shaft 1301 attached to plate 1302 is positioned within hollow main shaft 1304. Internal shaft 1301 and main shaft 1303 rotate independently of one another wherein rotation of main shaft 1303 causes rotation of wheel 1300 and rotation of internal shaft 1301 causes rotation of plate 1302 resulting in contraction or expansion of wheel 1301 as rollers 1305 move toward or away from main housing 1303. By rotation of internal shaft 1301, wheel 1300 may be adjusted to any size between the smallest size at maximum contraction of rollers 1305 and the largest size at maximum expansion of roller 1305. For example, in FIG. 13B wheel 1300 is maintained at a size between the smallest and largest possible size of wheel 1300. Internal shaft 1301 may be rotated clockwise to expand the wheel using, for example, an electric motor and the size of the wheel may be locked in placed when the electric motor is not supplied with power. In another example, the internal shaft may be rotated using electromagnetic force. For example, wheel 1400 of FIG. 14 comprises electromagnets 1401 and 1402 attached to internal shaft 1403 and main shaft 1404, respectively. In this case, internal shaft 1403 may be rotated by changing the magnetic poles on magnet 1401 attached to internal shaft 1403 wherein internal shaft 1403 is forced to rotate to align magnetic poles of magnet 1401 with opposite poles on the main shaft 1404 thereby expanding and contracting wheel 1400. In some embodiments, a sleeve may be provided around the aperture to limit the wear of the linkage and to provide better support for guiding the linkage. In some embodiments, the wheel may have between 10 and 20 apertures, spokes, linkages, and rollers.

FIG. 15 illustrates another example of a robot, specifically an underside of a robotic cleaner including rotating screw compressor type dual brushes 1500, drive wheels 1501, castor wheel 1502, peripheral brush 1503, sensors on an underside of the robot 1504, USB port 1505, power port 1506, power button 1507, speaker 1508, and a microphone 1509. Indentations 1510 may be indentations for fingers of a user for lifting the robot. In some embodiments, the indentations may be coated with a material different than the underside of the robot such that a user may easily distinguish the indentations. In this example, there are three sensors, one in the front and two on the side. The sensors may be used to sense presence and a type of driving surface. In some embodiments, some sensors are positioned on the front, sides, and underneath the robot. In some embodiments, the robot may include one or more castor wheels. In some embodiments, the robot may be built into an area of an environment (e.g., kitchen, living room, laundry room, mud room, etc.). In some embodiments, the bin of the surface cleaner may directly connect to and may by directly emptied into the central vacuum system of the environment. In some embodiments, the robot may be docked at a charging station while simultaneously connected to the central vacuum system.

In embodiments, floor sensors may be positioned in different locations on an underside of the robotic cleaner and may also have different orientations and sizes. FIGS. 16A-16D illustrate examples of alternative positions (e.g., displaced at some distance from the wheel or immediately adjacent to the wheel) and orientations (e.g., vertical or horizontal) for floor sensors 1504 positioned on the sides of the underside of the robot in FIG. 15 . The specific arrangement may depend on the geometry of the robot.

In some embodiments, floor sensors may be infrared (IR) sensors, ultrasonic sensors, laser sensors, time-of-flight (TOF) sensors, distance sensors, 3D or 2D range finders, 3D or 2D depth cameras, etc. For example, the floor sensor positioned on the front of the robot in FIG. 15 may be an IR sensor while the floor sensors positioned on the sides of the robot may be TOF sensors. In another example, FIGS. 17A and 17B illustrate examples of alternative positions (e.g., displaced at some distance from the wheel so there is time for the robot to react, wherein the reaction time depends on the speed of the robot and the sensor position) of IR floor sensors 1700 positioned on the sides of the underside of the robot. In these examples, the floor sensors are positioned in front of the wheel (relative to a forward moving direction of the wheel) to detect a cliff as the robot moves forward within the environment. Floor sensors positioned in front of the wheel may detect cliffs faster than floor sensors positioned adjacent to or further away from the wheel.

In embodiments, the number of floor sensors coupled to the underside of the robotic cleaner may vary depending on the functionality. For example, some robots may rarely drive backwards while others may drive backwards more often. Some robots may only turn clockwise while some may turn counterclockwise while some may do both. Some robots may execute a coastal drive or navigation from one side of the room. For example, FIG. 18 illustrates an example of an underside of a robotic cleaner with four floor sensors 1800. FIG. 19 illustrates an example of an underside of a robotic cleaner with five floor sensors 1900. FIG. 20 illustrates an example of an underside of a robotic cleaner with six floor sensors 2000.

In some embodiments, the robot is a robotic cleaner. In some embodiments, the robot includes a removable brush compartment with roller brushes designed to avoid collection of hair and debris at a connecting point of the roller brushes and a motor rotating the roller brushes. In some embodiments, the component powering rotation of the roller brushes may be masked from a user, the brush compartment, and the roller brushes by separating the power transmission from the brush compartment. In some embodiments, the roller brushes may be cleaned without complete removal of the roller brushes thereby avoiding tedious removal and realignment and replacement of the brushes after cleaning.

FIG. 21A illustrates an example of a brush compartment of a robotic cleaner including frame 2100, gear box 2101, and brushes 2102. The robotic cleaner includes a motor 2103 and gearbox 2104 that interfaces with gear box 2101 of the brush compartment when it is fully inserted into the underside of the robotic cleaner, as illustrated in FIG. 21B. In some embodiments, the motor is positioned above the brush compartment such that elements like hair and debris cannot become entangled at the point of connection between the power transmission and brushes. In some embodiments, the motor and gearbox of the robot is positioned adjacent to the brush compartment or in another position. In some embodiments, the power generating motion in the motor is normal to the axis of rotation the brushes. In some embodiments, the motor and gearbox of the robot and the gearbox of the brush compartment may be positioned on either end of the brush compartment. In some embodiments, more than one motor and gearbox interface with the brush compartment. In some embodiments, more than one motor and gearbox of the robot may each interface with a corresponding gearbox of the brush compartment. FIGS. 21C and 21D illustrate brush 2102 comprised of two portions, one portion of which is rotatably coupled to frame 2100 on an end opposite the gear box 2101 of the brush compartment such that the rotatable portion of the brush may rotate about an axis parallel to the width of the frame. In some embodiments, the two portions of brush 2102 may be separated when the brushes are non-operable. In some embodiments, the two portions of brush 2102 are separated such that brush blade 2105 may be removed from brush 2102 by sliding brush blade 2105 in direction 2106. In some embodiments, brush blades may be replaced when worn out or may be removed for cleaning. In some instances, this eliminates the tedious task of realigning brushes when they are completely removed from the robot. In some embodiments, a brush may be a single piece that may be rotatably coupled to the frame on one end such that the brush may rotate about an axis parallel to the width of the frame. In some embodiments, the brush may be fixed to the module such there is no need for removal of the brush during cleaning and may be put back together by simply clicking the brush into place. In some embodiments, separation of the brush from the module may not be a necessity for fully cleaning the brush but separation may be possible. In some embodiments, either end of a brush may be rotatably coupled to either end of the frame of the brush compartment. In some embodiments, the brushes may be directly attached to the chassis of the robotic cleaner, without the use of the frame. In some embodiments, brushes of the brush compartment may be configured differently from one another. For example, one brush may only rotate about an axis of the brush during operation while the other may additionally rotate about an axis parallel to the width of the frame when the brush is non-operable for removal of brush blades. FIG. 21E illustrates brush blade 2105 completely removed from brush 2102. FIG. 21F illustrates motor 2103 and gearbox 2104 of the robotic cleaner that interfaces with gearbox 2101 of the brush compartment through insert 2107. FIG. 21G illustrates brushes 2102 of the brush compartment, each brush including two portions. To remove brush blades 2105 from brushes 2102, the portions of brushes 2102 opposite gearbox 2101 rotate about an axis perpendicular to rotation axis of brushes 2102 and brush blades 2105 may be slid off of the two portions of brushes 2102 as illustrated in FIGS. 21D and 21E. FIG. 21H illustrates an example of a locking mechanism that may be used to lock each of the two portions of each brush 2102 together including locking core 2108 coupled to one portion of each brush and lock cavity 2109 coupled to a second portion of each brush. Locking core 2108 and lock 2109 interface with another to lock the two portions of each brush 2102 together.

FIG. 22A illustrates another example of a brush compartment of a robotic cleaner with similar components as described above including motor 2200 and gearbox 2201 of the robotic cleaner interfacing with gearbox 2202 of the brush compartment. Component 2203 of gearbox 2201 of the robotic cleaner interfacing with gearbox 2202 of the brush compartment differs from that shown in FIG. 21A. FIG. 22B illustrates that component 2203 of gearbox 2201 of the robotic cleaner is accessible by the brush compartment when inserted into the underside of the robotic cleaner, while motor 2200 and gearbox 2201 of the robotic cleaner are hidden within a chassis of the robotic cleaner.

In some embodiments, the processor of the robot may generate a global and local map of the environment using data collected by sensors of the robot. In some embodiments, sensors may include at least one depth measurement device, such as those described in Ser. No. 16/393,921, 15/243,783, 15/954,335, 15/954,410, 15/257,798, 15/674,310, and 15/683,255, the entire contents of which are hereby incorporated by reference. In some embodiments, the sensors may include at least one imaging sensor. In one embodiment, an imaging sensor may measure vectors from the imaging sensor to objects in the environment and the processor may calculate the L2 norm of the vectors using ∥x∥_(P)=(Σ_(i)|x_(i x|) ^(P))^(1/P) with P=2 to estimate depths to objects. In some embodiments, the processor may adjust previous data to account for a measured movement of the robot as it moves from observing one field of view to the next (e.g., differing from one another due to a difference in sensor pose). In some embodiments, a movement measuring device such as an odometer, optical tracking sensor (OTS), gyroscope, inertial measurement unit (IMU), optical flow sensor, etc. may measure movement of the robot and hence the sensor (assuming the two move as a single unit). In some instances, the processor matches a new set of data with data previously captured. In some embodiments, the processor compares the new data to the previous data and identifies a match when a number of consecutive readings from the new data and the previous data are similar. In some embodiments, identifying matching patterns in the value of readings in the new data and the previous data may also be used in identifying a match. In some embodiments, thresholding may be used in identifying a match between the new and previous data wherein areas or objects of interest within an image may be identified using thresholding as different areas or objects have different ranges of pixel intensity. In some embodiments, the processor may determine a cost function and may minimize the cost function to find a match between the new and previous data. In some embodiments, the processor may create a transform and may merge the new data with the previous data and may determine if there is a convergence. In some embodiments, the processor may determine a match between the new data and the previous data based on translation and rotation of the sensor between consecutive frames measured by an IMU. For example, overlap of data may be deduced based on interoceptive sensor measurements. In some embodiments, the translation and rotation of the sensor between frames may be measured by two separate movement measurement devices (e.g., optical encoder and gyroscope) and the movement of the robot may be the average of the measurements from the two separate devices. In some embodiments, the data from one movement measurement device is the movement data used and the data from the second movement measurement device is used to confirm the data of the first movement measurement device. In some embodiments, the processor may use movement of the sensor between consecutive frames to validate the match identified between the new and previous data. Or, in some embodiments, comparison between the values of the new data and previous data may be used to validate the match determined based on measured movement of the sensor between consecutive frames. For example, the processor may use data from an exteroceptive sensor (e.g., image sensor) to determine an overlap in data from an IMU, encoder, or OTS. In some embodiments, the processor may stitch the new data with the previous data at overlapping points to generate or update the map. In some embodiments, the processor may infer the angular disposition of the robot based on a size of overlap of the matching data and may use the angular disposition to adjust odometer information to overcome inherent noise of an odometer.

FIGS. 23A and 23B illustrate an example of identifying an area of overlap using raw pixel intensity data and the combination of data at overlapping points. In FIG. 23A, the overlapping area between overlapping image 2300 captured in a first field of view and image 2301 captured in a second field of view may be determined by comparing pixel intensity values of each captured image (or transformation thereof, such as the output of a pipeline that includes normalizing pixel intensities, applying Gaussian blur to reduce the effect of noise, detecting edges in the blurred output (such as Canny or Haar edge detection), and thresholding the output of edge detection algorithms to produce a bitmap like that shown) and identifying matching patterns in the pixel intensity values of the two images, for instance by executing operations by which some embodiments determine an overlap with a convolution. Lines 2302 represent pixels with high pixel intensity value (such as those above a certain threshold) in each image. Area 2303 of image 2300 and area 2304 of image 2301 capture the same area of the environment and, as such, the same pattern for pixel intensity values is sensed in area 2303 of image 2300 and area 2304 of image 2301. After identifying matching patterns in pixel intensity values in image 2300 and 2301, a matching overlapping area between both images may be determined. In FIG. 23B, the images are combined at overlapping area 2305 to form a larger image 2306 of the environment. In some cases, data corresponding to the images may be combined. For instance, depth values may be aligned based on alignment determined with the image.

FIGS. 24A-24C illustrate another example of identifying an area of overlap using raw pixel intensity data and the combination of data at overlapping points. FIG. 24A illustrates a top (plan) view of an object, such as a wall, with uneven surfaces wherein, for example, surface 2400 is further away from an observer than surface 2401 or surface 2402 is further away from an observer than surface 2403. In some embodiments, at least one infrared line laser positioned at a downward angle relative to a horizontal plane coupled with at least one camera may be used to determine the depth of multiple points across the uneven surfaces from captured images of the line laser projected onto the uneven surfaces of the object. Since the line laser is positioned at a downward angle, the position of the line laser in the captured image will appear higher for closer surfaces and will appear lower for further surfaces. Similar approaches may be applied with lasers offset from a camera in the horizontal plane. The position of the laser line (or feature of a structured light pattern) in the image may be detected by finding pixels with intensity above a threshold. The position of the line laser in the captured image may be related to a distance from the surface upon which the line laser is projected. In FIG. 24B, captured images 2404 and 2405 of the laser line projected onto the object surface for two different fields of view are shown. Projected laser lines with lower position, such as laser lines 2406 and 2407 in images 2404 and 2405 respectively, correspond to object surfaces 2400 and 2402, respectively, further away from the infrared illuminator and camera. Projected laser lines with higher position, such as laser lines 2408 and 2409 in images 2404 and 2405 respectively, correspond to object surfaces 2401 and 2403, respectively, closer to the infrared illuminator and camera. Captured images 2404 and 2405 from two different fields of view may be combined into a larger image of the environment by finding an overlapping area between the two images and stitching them together at overlapping points. The overlapping area may be found by identifying similar arrangement of pixel intensities in both images, wherein pixels with high intensity may be the laser line. For example, areas of images 2404 and 2405 bound within dashed lines 2410 have similar arrangement of pixel intensities as both images captured a same portion of the object within their field of view. Therefore, images 2404 and 2405 may be combined at overlapping points to construct larger image 2411 of the environment shown in FIG. 24C. The position of the laser lines in image 2411, indicated by pixels with intensity value above a threshold intensity, may also be used to infer depth of surfaces of objects from the infrared illuminator and camera (see, U.S. patent application Ser. No. 15/674,310, the entire contents of which is hereby incorporated by reference).

Due to measurement noise, discrepancies between the value of matching readings from the new data and the previous data may exist and may not be the exact same. In such cases, new readings may be calculated, or some of the readings may be selected as more accurate than others. For example, the overlapping readings from the new data and the previous data may be combined using a moving average (or some other measure of central tendency may be applied, like a median or mode) and adopted as the new readings for the matched readings. The minimum sum of errors and the minimum mean squared error may be used in some embodiments. Other mathematical methods may also be used to further process the matched readings, such as split and merge algorithm, incremental algorithm, Hough Transform, line regression, Random Sample Consensus, Expectation-Maximization algorithm, or curve fitting. In some embodiments, the k-nearest neighbor algorithm may be used. Some embodiments may implement DB-SCAN on readings and related values like pixel intensity, e.g., in a vector space that includes both depths and pixel intensities corresponding to those depths, to determine a plurality of clusters, each corresponding to readings of the same feature of an object.

In some embodiments, the map may be a state space with possible values for x, y, z. In some embodiments, a value of x and y may be a point on a Cartesian plane on which the robot drives and the value of z may be a height of obstacles or depth of cliffs. In some embodiments, the map may include additional dimensions (e.g., debris accumulation, floor type, obstacles, cliffs, stalls, etc.). For example, FIG. 25 illustrates an example of a map that represents a driving surface with vertical undulations (e.g., indicated by measurements in x-, y-, and z-directions). In some embodiments, a map filler may assign values to each cell in a map (e.g., Cartesian). In some embodiments, the value associated with each cell may be used to determine a location of the cell in a planar surface along with a height from a ground zero plane. In some embodiments, a plane of reference (e.g., x-y plane) may be positioned such that it includes a lowest point in the map. In this way, all vertical measurements (e.g., z values measured in a z-direction normal to the plane of reference) are always positive. In some embodiments, the processor of the robot may adjust the plane of reference each time a new lower point is discovered and all vertical measurements accordingly. In some embodiments, the plane of reference may be positioned at a height of the work surface at a location where the robot begins to perform work and data may be assigned a positive value when an area with an increased height relative to the plane of reference is discovered (e.g., an inclination or bump) and assigned a negative value when an area with a decreased height relative to the plane of reference is observed. In some embodiments, a map may include any number of dimensions. For example, a map may include dimensions that provide information indicating areas that were previously observed to have a high level of debris accumulation or areas that were previously difficult to traverse or areas that were previously identified by a user (e.g., using an application of a communication device), such as areas previously marked by a user as requiring a high frequency of cleaning. In some embodiments, the processor may identify a frontier (e.g., corner) and may include the frontier in the map.

In some embodiments, the processor may generate or update the map based at least on the L2 norm of vectors measured by sensors to objects within the environment. In some embodiments, each L2 norm of a vector may be replaced with an average of the L2 norms corresponding with neighboring vectors. In some embodiments, the processor may use more sophisticated methods to filter sudden spikes in the sensor readings. In some embodiments, sudden spikes may be deemed as outliers. In some embodiments, sudden spikes or drops in the sensor readings may be the result of a momentary environmental impact on the sensor. In some embodiments, the processor may generate or update a map using captured images of the environment. In some embodiments, a captured image may be processed prior to using the image in generating or updating the map. In some embodiments, processing may include replacing readings corresponding to each pixel with averages of the readings corresponding to neighboring pixels. FIG. 26 illustrates an example of replacing a reading 2600 corresponding with a pixel with an average of the readings 2601 of corresponding neighboring pixels 2602.

In some embodiments, the processor of the robot stores a portion of the L2 norms, such as L2 norms to critical points within the environment. In some embodiments, critical points may be second or third derivatives of a function connecting the L2 norms. In some embodiments, critical points may be second or third derivatives of raw pixel values. In some embodiments, the simplification may be lossy. In some embodiments, the lost information may be retrieved and pruned in each tick of the processor as the robot collects more information. In some embodiments, the accuracy of information may increase as the robot moves within the environment. For example, a critical point may be discovered to include two or more critical points over time. In some embodiments, loss of information may not occur or may be negligible when critical points are extracted with high accuracy. In some embodiments, depths may be measured to all objects within the environment. In some embodiments, depths may be measured to particular landmarks (e.g., some identified objects) or a portion of the objects within the environment (e.g., a subset of walls). In some embodiments, the processor may generate a map based on depths to a portion of objects within the environment. FIG. 27A illustrates an example of a robot 2700 with a sensor collecting data that is indicative of depth to a subset of points 2701 along the walls 2702 of the environment. FIG. 27B illustrates an example of a spatial model 2703 generated based on the depths to the subset of points 2701 of the environment shown in FIG. 27A, assuming the points are connected by lines. As robot 2700 moves from a first position at time t₀ to a second position at time t₁₀ within the environment and collects more data, the spatial model 2703 may be updated to more accurately represent the environment, as illustrated in FIG. 27C.

In some embodiments, the sensor of the robot 2700 continues to collect data to the subset of points 2701 along the walls 2702 as the robot 2700 moves within the environment. For example, FIG. 28A illustrates the sensor of the robot 2700 collecting data to the same subset of points 2701 at three different times 2800, 2801, and 2802 as the robot moves within the environment. In some cases, depending on the position of the robot, two particularities may appear as a single feature (or characteristic). For example, FIG. 28B illustrates the robot 2700 at a position si collecting data indicative of depths to points A and B. From position si points A and B appear to be the same feature. As the robot 2700 travels to a position s 2 and observes the edge on which points A and B lie from a different angle, the processor of the robot 2700 may differentiate points A and B as separate features. In some embodiments, the processor of the robot gains clarity on features as it navigates within the environment and observes the features from different positions and may be able to determine if a single feature is actually two features combined.

In some embodiments, the processor of the robot maps the environment while performing work. For example, FIG. 29 illustrates a robot 2900, a path of the robot 2901, an environment 2902, and an initial area mapped 2903 while performing work. In some embodiments, the path of the robot may overlap resulting in duplicate coverage of areas of the environment. For instance, the path 2901 illustrated in FIG. 29 includes overlapping segment 2904. In some cases, the processor of the robot may discard some overlapping data from the map. In some embodiments, the processor of the robot may determine overlap in the path based on images captured with a camera of the robot as the robot moves within the environment.

In some embodiments, the processor may extract lines that may be used to construct the environment of the robot. In some cases, there may be uncertainty associated with each reading of a noisy sensor measurement and there may be no single line that passes through the measurement. In such cases, the processor may select the best possible match, given some optimization criterion. In some cases, sensor measurements may be provided in polar coordinates, wherein x_(i)=(ρ_(i), θ_(i)). The processor may model uncertainty associated with each measurement with two random variables, X_(i)=(P_(i), Q_(i)). To satisfy the Markovian requirement, the uncertainty with respect to the actual value of P and Q must be independent, wherein E[P_(i)·P_(j)]=E[P_(i)]E[P_(j)], E[Q_(i)·Q_(j)]=E[Q_(i)]E[Q_(j)], and E[P_(i)·Q_(j)]=E[P_(i)]E[Q_(j)], ∀i, j=1, . . . , n. In some embodiments, each random variable may be subject to a Gaussian probability, wherein P_(i)˜N (ρ_(i), (σ²)_(ρi)) and Q_(i)˜N(θ_(i), (σ²)_(θ) ₁ ). In some embodiments, the processor may determine corresponding Euclidean coordinates x=ρ cos θ and y=ρ sin θ of a polar coordinate. In some embodiments, the processor may determine a line on which all measurements lie, i.e., ρ cos θ cos α+ρ sin θ sin α−r=ρ cos(θ−α)−r=0. However, obtaining a value of zero represents an ideal situation wherein there is no error. In actuality, this is a measure of the error between a measurement point (ρ, θ) and the line, specifically in terms of the minimum orthogonal distance between the point and the line. In some embodiments, the processor may minimize the error. In some embodiments, the processor may minimize the sum of square of all the errors using S=Σ_(i) d_(i) ²=Σ_(i) (ρ_(i) cos(θ_(i)−α)−r)², wherein

$\frac{\partial S}{\partial\alpha} = {{0{and}\frac{\partial S}{\partial r}} = {0.}}$ in some instances, measurements may not have the same errors. In some embodiments, a measurement point of the spatial representation of the environment may represent a mean of the measurement and a circle around the point may indicate the variance of the measurement. The size of circle may be different for different measurements and may be indicative of the amount of influence that each point may have in determining where the perimeter line fits. For example, in FIG. 30A, three measurements A, B, and C are shown, each with a circle 3000 indicating variance of the respective measurement. The perimeter line 3001 is closer to measurement B as it has a higher confidence and less variance. In some instances, the perimeter line may not be a straight line depending on the measurements and their variance. While this method of determining a position of a perimeter line may result in a perimeter line 3001 shown in FIG. 30B, the perimeter line of the environment may actually look like the perimeter line 3002 or 3003 illustrated in FIG. 30C or FIG. 30D. In some embodiments, the processor may search for particular patterns in the measurement points. For example, it may be desirable to find patterns that depict any of the combinations in FIG. 31 .

In some embodiments, the processor (or a SLAM algorithm executed by the processor) may obtain scan data collected by sensors of the robot during rotation of the robot. In some embodiments, a subset of the data may be chosen for building the map. For example, 49 scans of data may be obtained for map building and four of those may be identified as scans of data that are suitable for matching and building the map. In some embodiments, the processor may determine a matching pose of data and apply a correction accordingly. For example, a matching pose may be determined to be (−0.994693, −−2.75821) and may be corrected to (−1.01251, −0.0702046, −2.73414) which represents a heading error of 1.3792 degrees and a total correction of (−0.0178176, 0.0240715) having traveled (0.0110555, 0.0113022, 6.52475). In some embodiments, a multi map scan matcher may be used to match data. In some embodiments, the multi map scan matcher may fail if a matching threshold is not met. In some embodiments, a Chi-squared test may be used.

In some embodiments, distance measuring devices used in observing the environment may have different FOVs and angular resolutions may be used. For example, a depth sensor may provide depth readings within a FOV ranging from zero to 90 degrees with a one degree angular resolution. Another distance sensor may provide distance readings within a FOV ranging from zero to 180 degrees, with a 0.5 degrees angular resolution. In another case, a LIDAR may provide a 270 or 360 degree FOV.

In some embodiments, the immunity of a distance measuring device may be related to an illumination power emitted by the device and a sensitivity of a receiver of the device. In some instances, an immunity to ambient light may be defined by lux. For example, a LIDAR may have a typical immunity of 500 lux and a maximum immunity of 1500 lux. Another LIDAR may have a typical immunity of 2000 lux and a maximum immunity of 4500 lux. In some embodiments, scan frequency, given in Hz, may also influence immunity of distance measuring devices. For example, a LIDAR may have a minimum scan frequency of 4 Hz, typical scan frequency of 5 Hz, and a maximum scan frequency of 10 Hz. In some instances, Class I laser safety standards may be used to cap the power emitted by a transmitter. In some embodiments, a laser and optical lens may be used for the transmission and reception of a laser signal to achieve high frequency ranging. In some cases, laser and optical lens cleanliness may have some adverse effects on immunity as well. In some embodiments, the processor may use particular techniques to distinguish the reflection of illumination light from ambient light, such as various software filters. For example, once depth data is received it may be processed to distinguish the reflection of illumination light from ambient light.

In some embodiments, the center of the rotating core of a LIDAR used to observe the environment may be different than the center of the robot. In such embodiments, the processor may use a transform function to map the readings of the LIDAR sensor to the physical dimension of the robot. In some embodiments, the LIDAR may rotate clockwise or counterclockwise. In some embodiments, the LIDAR readings may be different depending on the motion of the robot. For example, the readings of the LIDAR may be different when the robot is rotating in a same direction as a LIDAR motor than when the robot is moving straight or rotating in an opposite direction to the LIDAR motor. In some instances, a zero angle of the LIDAR may not be the same as a zero angle of the robot.

In some embodiments, data may be collected using a proprioceptive sensor and an exteroceptive sensor. In some embodiments, the processor may use data from one of the two types of sensors to generate or update the map and may use data from the other type of sensor to validate the data used in generating or updating the map. In some embodiments, the processor may enact both scenarios, wherein the data of the proprioceptive sensor is used to validate the data of the exteroceptive sensor and vice versa. In some embodiments, the data collected by both types of sensors may be used in generating or updating the map. In some embodiments, the data collected by one type of sensor may be used in generating or updating a local map while data from the other type of sensor may be used for generating or updating a global map. In some embodiments, data collected by either type of sensor may include depth data (e.g., depth to perimeters, obstacles, edges, corners, objects, etc.), raw image data, or a combination.

In some embodiments, there may be possible overlaps in data collected by an exteroceptive sensor. In some embodiments, a motion filter may be used to filter out small jitters the robot may experience while taking readings with an image sensor or other sensors. FIG. 32 illustrates a flow path of an image, wherein the image is passed through a motion filter before processing. In some embodiments, the processor may vertically align captured images in cases where images may not be captured at an exact same height. FIG. 33A illustrates unaligned images 3300 due to the images being captured at different heights. FIG. 33B illustrates the images 3300 after alignments. In some embodiments, the processor detects overlap between data at a perimeter of the data. Such an example is illustrated in FIG. 34 , wherein an area of overlap 3400 at a perimeter of the data 3401 is indicated by the arrow 3402. In some embodiments, the processor may detect overlap between data in other ways. An example of an alternative area of overlap 3403 between data 3401 is illustrated in FIG. 35 , as indicated by the arrow 3404. In some embodiments, there may be no overlap between data 3401 and the processor may use a transpose function to create a virtual overlap based on an optical flow or an inertia measurement. FIG. 36 illustrates a lack of overlap between data 3401.

In some embodiments, the movement of the robot may be measured and tracked by an encoder, IMU, and/or optical tracking sensor (OTS) and images captured by an image sensor may be combined together to form a spatial representation based on overlap of data and/or measured movement of the robot. In some embodiments, the processor determines a logical overlap between data and does not represent data twice in a spatial representation output. For example, FIG. 37 illustrates a path 3700 of the robot and an amount of overlap 3701. In some embodiments, overlapping parts may be used for combining images, however, the spatial representation may only include one set (or only some sets) of the overlapping data or in other cases may include all sets of the overlapping data. In some embodiments, the processor may employ a convolution to obtain a single set of data from the two overlapping sets of data. In such cases, the spatial representation after collecting data during execution of the path 3700 in FIG. 37 may appear as in FIG. 38 , as opposed to the spatial representation in FIG. 39 wherein spatial data is represented twice. During discovery, a path of the robot may overlap frequently, as in the example of FIG. 40 , however, the processor may not use each of the overlapping data collected during those overlapping paths when creating the spatial representation.

In some embodiments, sensors of the robot used in observing the environment may have a limited field of view (FOV). In some embodiments, the FOV is 360 or 180 degrees. In some embodiments, the FOV of the sensor may be limited vertically or horizontally or in another direction or manner. In some embodiments, sensors with larger FOVs may be blind to some areas. In some embodiments, blind spots of robots may be provided with complementary types of sensors that may overlap and may sometimes provide redundancy. For example, a sonar sensor may be better at detecting a presence or a lack of presence of an obstacle within a wider FOV whereas a camera may provide a location of the obstacle within the FOV. In one example, a sensor of a robot with a 360 degree linear FOV may observe an entire plane of an environment up to the nearest objects (e.g., perimeters or furniture) at a single moment, however some blind spots may exist. While a 360 degree linear FOV provides an adequate FOV in one plane, the FOV may have vertical limitations. FIG. 41 illustrates a robot 4100 observing an environment 4101, with blind spot 4102 that sensors of robot 4100 cannot observe. With a limited FOV, there may be areas that go unobserved as the robot moves. For example, FIG. 42 illustrates robot 4200 and fields of view 4201 and 4202 of a sensor of the robot as the robot moves from a first position to a second position, respectively. Because of the small FOV or blind spot, object 4203 within area 4204 goes unnoticed as the robot moves from observing FOV 4201 to 4202. In some cases, the processor of the robot fits a line 4205 and 4206 to the data captured in FOVs 4201 and 4202, respectively. In some embodiments, the processor fits a line 4207 to the data captured in FOVs 4201 and 4202 that aligns with lines 4205 and 4206, respectively. In some embodiments, the processor aligns the data observed in different FOVs to generate a map. In some embodiments, the processor connects lines 4205 and 4206 by a connecting line or by a line fitted to the data captured in FOVs 4201 and 4202. In some embodiments, the line connecting lines 4205 and 4206 has lower certainty as it corresponds to an unobserved area 4204. For example, FIG. 43 illustrates estimated perimeter 4300, wherein perimeter line 4300 is fitted to the data captured in FOVs 4201 and 4202. The portion of perimeter line 4300 falling within area 4204, to which sensors of the robot were blind, is estimated based on a line that connects lines 4205 and 4206. However, since area 4204 is unobserved by sensors of the robot, the processor is less certain of the portion of the perimeter 4300 falling within area 4204. For example, the processor is uncertain if the portion of perimeter 4300 falling within area 4204 is actually perimeter 4301. Such a perimeter estimation approach may be used when the speed of data acquisition is faster than the speed of the robot.

In some embodiments, layered maps may be used in avoiding blind spots. In some embodiments, the processor may generate a map including multiple layers. In some embodiments, one layer may include areas with high probability of being correct (e.g., areas based on observed data) while another may include areas with lower probability of being correct (e.g., areas unseen and predicted based on observed data). In some embodiments, a layer of the map or another map generated may only include areas unobserved and predicted by the processor of the robot. At any time, the processor may subtract maps from one another, add maps with one another (e.g., by layering maps), or may hide layers.

In some embodiments, a layer of a map may be a map generated based solely on the observations of a particular sensor type. For example, a map may include three layers and each layer may be a map generated based solely on the observations of a particular sensor type. In some embodiments, maps of various layers may be superimposed vertically or horizontally, deterministically or probabilistically, and locally or globally. In some embodiments, a map may be horizontally filled with data from one (or one class of) sensor and vertically filled using data from a different sensor (or class of sensor).

In some embodiments, different layers of the map may have different resolutions. For example, a long range limited FOV sensor of a robot may not observe a particular obstacle. As a result, the obstacle is excluded from a map generated based on data collected by the long range limited FOV sensor. However, as the robot approaches the obstacle, a short range obstacle sensor may observe the obstacle and add it to a map generated based on the data of the obstacle sensor. The processor may layer the two maps and the obstacle may therefore be observed. In some cases, the processor may add the obstacle to a map layer corresponding to the obstacle sensor or to a different map layer. In some embodiments, the resolution of the map (or layer of a map) depends on the sensor from which the data used to generate the map came from. In some embodiments, maps with different resolutions may be constructed for various purposes. In some embodiments, the processor chooses a particular resolution to use for navigation based on the action being executed or settings of the robot. For example, if the robot is travelling at a slow driving speed, a lower resolution map layer may be used. In another example, the robot is driving in an area with high obstacle density at an increased speed therefore a higher resolution map layer may be used. In some cases, the data of the map is stored in a memory of the robot. In some embodiments, data is used with less accuracy or some floating points may be excluded in some calculations for lower resolution maps. In some embodiments, maps with different resolutions may all use the same underlying raw data instead of having multiple copies of that raw information stored.

In some embodiments, the processor executes a series of procedures to generate layers of a map used to construct the map from stored values in memory. In some embodiments, the same series of procedures may be used construct the map at different resolutions. In some embodiments, there may be dedicated series of procedures to construct various different maps. In some embodiments, a separate layer of a map may be stored in a separate data structure. In some embodiments, various layers of a map or various different types of maps may be at least partially constructed from the same underlying data structures.

In some embodiments, the processor identifies gaps in the map (e.g., due to areas blind to a sensor or a range of a sensor). In some embodiments, the processor may actuate the robot to move towards and investigates the gap, collecting observations and mapping new areas by adding new observations to the map until the gap is closed. However, in some instances, the gap or an area blind to a sensor may not be detected. In some embodiments, a perimeter may be incorrectly predicted and may thus block off areas that were blind to the sensor of the robot. For example, FIG. 44 illustrates actual perimeter 4400, blind spot 4401, and incorrectly predicted perimeter 4402, blocking off blind spot 4401. A similar issue may arise when, for example, a bed cover or curtain initially appears to be a perimeter when in reality, the robot may navigate behind the bed cover or curtain.

Issues related to incorrect perimeter prediction may be eradicated with thorough inspection of the environment and training. For example, data from a second type of sensor may be used to validate a first map constructed based on data collected by a first type of sensor. In some embodiments, additional information discovered by multiple sensors may be included in multiple layers or different layers or in the same layer. In some embodiments, a training period of the robot may include the robot inspecting the environment various times with the same sensor or with a second (or more) type of sensor. In some embodiments, the training period may occur over one session (e.g., during an initial setup of the robot) or multiple sessions. In some embodiments, a user may instruct the robot to enter training at any point. In some embodiments, the processor of the robot may transmit the map to the cloud for validation and further machine learning processing. For example, the map may be processed on the cloud to identify rooms within the map. In some embodiments, the map including various information may be constructed into a graphic object and presented to the user (e.g., via an application of a communication device). In some embodiments, the map may not be presented to the user until it has been fully inspected multiple times and has high accuracy. In some embodiments, the processor disables a main brush and/or a side brush of the robot when in training mode or when searching and navigating to a charging station.

In some embodiments, wherein the gap in the perimeters is due to an opening in the wall (e.g., a doorway or an opening between two separate areas), exploration of the undiscovered areas within which the gap is identified may lead to the discovery of a room, a hallway, or any other separate area. In some embodiments, identified gaps that are found to be, for example, an opening in the wall may be used in separating areas into smaller subareas. For example, the opening in the wall between two rooms may be used to segment the area into two subareas, where each room is a single subarea. This may be expanded to any number of rooms. In some embodiments, the processor of the robot may provide a unique tag to each subarea and may use the unique tag to order the subareas for coverage by the robot, choose different work functions for different subareas, add restrictions to subareas, set cleaning schedules for different subareas, and the like. In some embodiments, the processor may detect a second room beyond an opening in the wall detected within a first room being covered and may identify the opening in the wall between the two rooms as a doorway. Methods for identifying a doorway are described in U.S. patent application Ser. Nos. 16/163,541 and 15/614,284, the entire contents of which are hereby incorporated by reference. For example, in some embodiments, the processor may fit depth data points to a line model and any deviation from the line model may be identified as an opening in the wall by the processor. In some embodiments, the processor may use the range and light intensity recorded by the depth sensor for each reading to calculate an error associated with deviation of the range data from a line model. In some embodiments, the processor may relate the light intensity and range of a point captured by the depth sensor using

${{I(n)} = \frac{a}{{r(n)}^{4}}},$ wherein I(n) is the intensity of point n, r(n) is the distance of the particular point on an object and α=E(I(n)r(n)⁴) is a constant that is determined by the processor using a Gaussian assumption.

Given d_(min), the minimum distance of all readings taken, the processor may calculate the distance

${r(n)} = \frac{d_{\min}}{\sin\left( {- {\theta(n)}} \right)}$ corresponding to a point n on an object at any angular resolution θ(n). In some embodiments, the processor may determine the horizon

$\alpha = {a\sin\frac{d_{\min}}{d_{\max}}}$ of the depth sensor given d_(min) and d_(max), the minimum and maximum readings of all readings taken, respectively. The processor may use a combined error

$e = {{\sum\left( {{{I(n)}{r(n)}^{4}} - a} \right)^{2}} + \left( {{r(n)} - \left( \frac{d_{\min}}{\sin\left( {- {\theta(n)}} \right)} \right)} \right)^{2}}$ of the range and light intensity output by the depth sensor to identify deviation from the line model and hence detect an opening in the wall. The error e is minimal for walls and significantly higher for an opening in the wall, as the data will significantly deviate from the line model. In some embodiments, the processor may use a threshold to determine whether the data points considered indicate an opening in the wall when, for example, the error exceeds some threshold value. In some embodiments, the processor may use an adaptive threshold wherein the values below the threshold may be considered to be a wall.

In some embodiments, the processor may not consider openings with width below a specified threshold as an opening in the wall, such as openings with a width too small to be considered a door or too small for the robot to fit through. In some embodiments, the processor may estimate the width of the opening in the wall by identifying angles φ with a valid range value and with intensity greater than or equal to

$\frac{a}{d_{\max}}.$ The difference between the smallest and largest angle among all

$\varphi = \left\{ {{{\theta(n)}\bigvee\left( \left\{ {{r(n)} \neq \infty} \right\} \right)} \land \left( {{I(n)} \geq \left( \frac{a}{d_{\max}} \right)^{4}} \right)} \right\}$ angles may provide an estimate of the width of the opening. In some embodiments, the processor may also determine the width of an opening in the wall by identifying the angle at which the measured range noticeably increases and the angle at which the measured range noticeably decreases and taking the difference between the two angles.

In some embodiments, the processor may detect a wall or opening in the wall using recursive line fitting of the data. The processor may compare the error (y−(ax+b))² of data points n₁ to n₂ to a threshold T₁ and summates the number of errors below the threshold. The processor may then compute the difference between the number of points considered (n₂−n₁) and the number of data points with errors below threshold T₁. If the difference is below a threshold T₂, i.e.,

${\left( {{\left( {n_{2} - n_{1}} \right) - {{\sum}_{n_{1}}^{n_{2}}\left( {y - \left( {{ax} + b} \right)} \right)^{2}}} < T_{1}} \right) < T_{2}},$ then the processor assigns the data points to be a wall and otherwise assigns the data points to be an opening in the wall.

In another embodiment, the processor may use entropy to predict an opening in the wall, as an opening in the wall results in disordered measurement data and hence larger entropy value. In some embodiments, the processor may mark data with entropy above a certain threshold as an opening in the wall. In some embodiments, the processor determines entropy of data using

${H(X)} = {{- {\sum}_{i = 1}^{n}}{P\left( x_{i} \right)}\log{P\left( x_{i} \right)}}$ wherein X=(x₁, x₂, . . . , x_(n)) is a collection of possible data, such as depth measurements. P(x_(i)) is the probability of a data reading having value x_(i). P(x_(i)) may be determined by, for example, counting the number of measurements within a specified area of interest with value x_(i) and dividing that number by the total number of measurements within the area considered. In some embodiments, the processor may compare entropy of collected data to entropy of data corresponding to a wall. For example, the entropy may be computed for the probability density function (PDF) of the data to predict if there is an opening in the wall in the region of interest. In the case of a wall, the PDF may show localization of readings around wall coordinates, thereby increasing certainty and reducing entropy.

In some embodiments, the processor may apply a probabilistic method by pre-training a classifier to provide a priori prediction. In some embodiments, the processor may use a supervised machine learning algorithm to identify features of openings and walls. A training set of, for example, depth data may be used by the processor to teach the classifier common features or patterns in the data corresponding with openings and walls such that the processor may identify walls and openings in walls with some probability distribution. In this way, a priori prediction from a classifier combined with real-time data measurement may be used together to provide a more accurate prediction of a wall or opening in the wall. In some embodiments, the processor may use Bayes theorem to provide probability of an opening in the wall given that the robot is located near an opening in the wall,

${P\left( A \middle| B \right)} = {\frac{{P\left( B \middle| A \right)}{P(A)}}{P(B)}.}$ P(A|B) is the probability of an opening in the wall given that the robot is located close to an opening in the wall, P(A) is the probability of an opening in the wall, P(B) is the probability of the robot being located close to an opening in the wall, and P(B|A) is the probability of the robot being located close to an opening in the wall given that an opening in the wall is detected.

The different methods described for detecting an opening in the wall above may be combined in some embodiments and used independently in others. Examples of methods for detecting a doorway are described in, for example, U.S. patent application Ser. Nos. 15/615,284 and 16/163,541, the entire contents of which are hereby incorporated by reference. In some embodiments, the processor may mark the location of doorways within a map of the environment. In some embodiments, the robot may be configured to avoid crossing an identified doorway for a predetermined amount of time or until the robot has encountered the doorway a predetermined number of times. In some embodiments, the robot may be configured to drive through the identified doorway into a second subarea for cleaning before driving back through the doorway in the opposite direction. In some embodiments, the robot may finish cleaning in the current area before crossing through the doorway and cleaning the adjacent area. In some embodiments, the robot may be configured to execute any number of actions upon identification of a doorway and different actions may be executed for different doorways. In some embodiments, the processor may use doorways to segment the environment into subareas. For example, the robot may execute a wall-follow coverage algorithm in a first subarea and rectangular-spiral coverage algorithm in a second subarea, or may only clean the first subarea, or may clean the first subarea and second subarea on particular days and times. In some embodiments, unique tags, such as a number or any label, may be assigned to each subarea. In some embodiments, the user may assign unique tags to each subarea, and embodiments may receive this input and associate the unique tag (such as a human-readable name of a room, like “kitchen”) with the area in memory. Some embodiments may receive instructions that map tasks to areas by these unique tags, e.g., a user may input an instruction to the robot in the form of “vacuum kitchen,” and the robot may respond by accessing the appropriate map in memory that is associated with this label to effectuate the command. In some embodiments, the robot may assign unique tags to each subarea. The unique tags may be used to set and control the operation and execution of tasks within each subarea and to set the order of coverage of each subarea. For example, the robot may cover a particular subarea first and another particular subarea last. In some embodiments, the order of coverage of the subareas is such that repeat coverage within the total area is minimized. In another embodiment, the order of coverage of the subareas is such that coverage time of the total area is minimized. The order of subareas may be changed depending on the task or desired outcome. The example provided only illustrates two subareas for simplicity but may be expanded to include multiple subareas, spaces, or environments, etc. In some embodiments, the processor may represent subareas using a stack structure, for example, for backtracking purposes wherein the path of the robot back to its starting position may be found using the stack structure.

In some embodiments, a map may be generated from data collected by sensors coupled to a wearable item. For example, sensors coupled to glasses or lenses of a user walking within a room may, for example, record a video, capture images, and map the room. For instance, the sensors may be used to capture measurements (e.g., depth measurements) of the walls of the room in two or three dimensions and the measurements may be combined at overlapping points to generate a map using SLAM techniques. In such a case, a step counter may be used instead of an odometer (as may be used with the robot during mapping, for example) to measure movement of the user. In some embodiments, the map may be generated in real-time. In some embodiments, the user may visualize a room using the glasses or lenses and may draw virtual objects within the visualized room. In some embodiments, the processor of the robot may be connected to the processor of the glasses or lenses. In some embodiments, the map is shared with the processor of the robot. In one example, the user may draw a virtual confinement line in the map for the robot. The processor of the glasses may transmit this information to the processor of the robot. Or, in another case, the user may draw a movement path of the robot or choose areas for the robot to operate within.

In some embodiments, the processor may determine an amount of time for building the map. In some embodiments, an Internet of Things (IoT) subsystem may create and/or send a binary map to the cloud and an application of a communication device. In some embodiments, the IoT subsystem may store unknown points within the map. In some embodiments, the binary maps may be an object with methods and characteristics such as capacity, raw size, etc. having data types such as a byte. In some embodiments, a binary map may include the number of obstacles. In some embodiments, the map may be analyzed to find doors within the room. In some embodiments, the time of analysis may be determined. In some embodiments, the global map may be provided in ASCII format. In some embodiments, a Wi-Fi command handler may push the map to the cloud after compression. In some embodiments, information may be divided into packet format. In some embodiments, compressions such as zlib may be used. In some embodiments, each packet may be in ASCII format and compressed with an algorithm such as zlib. In some embodiments, each packet may have a timestamp and checksum. In some embodiments, a handler such as a Wi-Fi command handler may gradually push the map to the cloud in intervals and increments. In some embodiments, the map may be pushed to the cloud after completion of coverage wherein the robot has examined every area within the map by visiting each area implementing any required corrections to the map. In some embodiments, the map may be provided after a few runs to provide an accurate representation of the environment. In some embodiments, some graphic processing may occur on the cloud or on the communication device presenting the map. In some embodiments, the map may be presented to a user after an initial training round. In some embodiments, a map handle may render an ASCII map. Rendering time may depend on resolution and dimension. In some embodiments, the map may have a tilt value in degrees.

In some embodiments, images or other sensor readings may be stitched and linked at both ends such that there is no end to the stitched images, such as in FIG. 45 , wherein data A₁ to A₅ are stitched as are data A₁ and data A₅. For example, a user may use a finger to swipe in a leftwards direction across a screen of a mobile phone displaying a panorama image to view and pass past the right side of the panorama image and continue on to view the opposite side of the panorama image, in a continuous manner. In some embodiments, the images or other sensor readings may be two dimensional or three dimensional. For example, three dimensional readings may provide depth and hence spatial reality.

The robot may, for example, use the map to autonomously navigate the environment during operation, e.g., accessing the map to determine that a candidate route is blocked by an obstacle denoted in the map, to select a path with a path planning algorithm from a current point to a target point, or the like. It should be emphasized, though, that embodiments are not limited to techniques that construct maps in the ways described herein, as the present techniques may also be used for plane finding in augmented reality, barrier detection in virtual reality applications, outdoor mapping with autonomous drones, and other similar applications, which is not to suggest that any other description is limiting. Further details of mapping methods that may be used are described in U.S. patent application Ser. Nos. 16/048,179, 16/048,185, 16/163,541, 16/163,562, 16/163,508, and 16/185,000, the entire contents of which are hereby incorporated by reference.

In some embodiments, the processor localizes the robot during mapping or during operation. In some embodiments, methods of localization are inherently independent from mapping and path planning but may be used in tandem with any mapping or path planning method or may be used independently to localize the robot irrespective of the path or map of the environment. In some embodiments, the processor uses quantum SLAM.

In some embodiments, the processor may localize the robot within the environment represented by a phase space or Hilbert space. In some embodiments, the space may include all possible states of the robot within the space. In some embodiments, a probability distribution may be used by the processor of the robot to approximate the likelihood of the state of the robot being within a specific region of the space. In some embodiments, the processor of the robot may determine a phase space probability distribution over all possible states of the robot within the phase space using a statistical ensemble including a large collection of virtual, independent copies of the robot in various states of the phase space. In some embodiments, the phase space may consist of all possible values of position and momentum variables. In some embodiments, the processor may represent the statistical ensemble by a phase space probability density function ρ(p, q, t), q and p denoting position and velocity vectors. In some embodiments, the processor may use the phase space probability density function ρ(p, q, t) to determine the probability ρ(p, q, t)dq dp that the robot at time t will be found in the infinitesimal phase space volume dq dp. In some embodiments, the phase space probability density function ρ(p, q, t) may have the properties ρ(p, q, t)≥0 and ∫ρ(p, q, t)d(p, q)=1, ∀t≥0, and the probability of the position q lying within a position interval a, b is

P[a ≤ q ≤ b] = ∫_(a)^(b)∫ρ(p, q, t)dpdq. Similarly, the probability of the velocity p lying within a velocity interval c, d is

P[c ≤ q ≤ d] = ∫_(c)^(d)∫ρ(p, q, t)dqdp. In some embodiments, the processor may determine values by integration over the phase space. For example, the processor may determine the expectation value of the position q by

q

=∫q ρ(p, q, t)d(p, q).

In some embodiments, the processor may evolve each state within the ensemble over time t according to an equation of motion. In some embodiments, the processor may model the motion of the robot using a Hamiltonian dynamical system with generalized coordinates q, p wherein dynamical properties may be modeled by a Hamiltonian function H. In some embodiments, the function may represent the total energy of the system. In some embodiments, the processor may represent the time evolution of a single point in the phase space using Hamilton's equations

${\frac{dp}{dt} = {- \frac{\partial H}{\partial q}}},{\frac{dq}{dt} = {\frac{\partial H}{\partial p}.}}$ In some embodiments, the processor may evolve the entire statistical ensemble of phase space density function ρ(p, q, t) under a Hamiltonian H using the Liouville equation

${\frac{\partial\rho}{\partial t} = {- \left\{ {\rho,H} \right\}}},$ wherein {·,·} denotes the Poisson bracket and H is the Hamiltonian of the system. For two functions ƒ, g on the phase space, the Poisson bracket may be given by

$\left\{ {f,g} \right\} = {\sum_{\,{i = 1}}^{\, N}{\left( {{\frac{\partial f}{\partial q_{i}}\frac{\partial g}{\partial p_{i}}} - {\frac{\partial f}{\partial p_{i}}\frac{\partial g}{\partial q_{i}}}} \right).}}$ In this approach, the processor may evolve each possible state in the phase space over time instead of keeping the phase space density constant over time, which is particularly advantageous if sensor readings are sparse in time.

In some embodiments, the processor may evolve the phase space probability density function ρ(p, q, t) over time using the Fokker-Plank equation which describes the time evolution of a probability density function of a particle under drag and random forces. In comparison to the behavior of the robot modeled by both the Hamiltonian and Liouville equations, which are purely deterministic, the Fokker-Planck equation includes stochastic behaviour. Given a stochastic process with dX_(t)=μt(X_(t), t)dt+σ(X_(t), t)dW_(t), wherein X_(t) and μt(X_(t), t) are M-dimensional vectors, σ(X_(t), t) is a M×P matrix, and W_(t) is a P-dimensional standard Wiener process, the probability density ρ(x, t) for X_(t) satisfies the Fokker-Planck equation

$\frac{\partial{\rho\left( {x,t} \right)}}{\partial t} = {{- {\sum_{\,{i = 1}}^{\, M}{\frac{\partial}{\partial x_{i}}\left\lbrack {{\mu_{i}\left( {x,t} \right)}{\rho\left( {x,t} \right)}} \right\rbrack}}} + {\sum_{\,{i = 1}}^{\, M}{\sum_{\,{j = 1}}^{\, M}{\frac{\partial^{2}}{{\partial x_{i}}{\partial x_{j}}}\left\lbrack {{D_{ij}\left( {x,t} \right)}{\rho\left( {x,t} \right)}} \right\rbrack}}}}$ with drift vector μ=(μ₁, . . . , μ_(M)) and diffusion tensor

$D = {\frac{1}{2}\sigma{\sigma^{T}.}}$ In some embodiments, the processor may add stochastic forces to the motion of the robot governed by the Hamiltonian H and the motion of the robot may then be given by the stochastic differential equation

${{dX_{t}} = {\begin{pmatrix} {dq} \\ {dp} \end{pmatrix} = {{\begin{pmatrix} {+ \frac{\partial H}{\partial p}} \\ {- \frac{\partial H}{\partial p}} \end{pmatrix}{dt}} = {\begin{pmatrix} 0_{N} \\ {\sigma_{N}\left( {p,q,t} \right)} \end{pmatrix}dW_{t}}}}},$ wherein σ_(N) is a N×N matrix and dW_(t) is a N-dimensional Wiener process. This leads to the Fokker-Plank equation

${\frac{\partial\rho}{\partial t} = {{- \left\{ {\rho,H} \right\}} + {\nabla_{p} \cdot \left( {D{\nabla_{p}\rho}} \right)}}},$ wherein ∇_(p) denotes the gradient with respect to position p, ∇·denotes divergence, and

$D = {\frac{1}{2}\sigma_{N}\sigma_{N}^{T}}$ is tile diffusion tensor.

In other embodiments, the processor may incorporate stochastic behaviour by modeling the dynamics of the robot using Langevin dynamics, which models friction forces and perturbation to the system, instead of Hamiltonian dynamics. The Langevin equation may be given by M{umlaut over (q)}=−∇_(q)U(q)−γp+√{square root over (2γk_(B) TM)}R(t), wherein (−γp) are friction forces, R (t) are random forces with zero-mean and delta-correlated stationary Gaussian process, T is the temperature, k_(B) is Boltzmann's constant, γ is a damping constant, and M is a diagonal mass matrix. In some embodiments, the Langevin equation may be reformulated as a Fokker-Planck equation

$\frac{\partial\rho}{\partial t} = {{- \left\{ {\rho,H} \right\}} + {\nabla_{p} \cdot \left( {\gamma p\rho} \right)} + {k_{B}T{\nabla_{p} \cdot \left( {\gamma M{\nabla_{p}\rho}} \right)}}}$ that the processor may use to evolve the phase space probability density function over time. In some embodiments, the second order term ∇·(γM∇_(p)ρ) is a model of classical Brownian motion, modeling a diffusion process. In some embodiments, partial differential equations for evolving the probability density function over time may be solved by the processor of the robot using, for example, finite difference and/or finite element methods.

FIG. 46A illustrates an example of an initial phase space probability density of a robot, a Gaussian in (q, p) space. FIG. 46B illustrates an example of the time evolution of the phase space probability density after four time units when evolved using the Liouville equation incorporating Hamiltonian dynamics,

$\frac{\partial\rho}{\partial t} = {- \left\{ {\rho,H} \right\}}$ with Hamiltonian

$H = {\frac{1}{2}{p^{2}.}}$ FIG. 46C illustrates an example of the time evolution of the phase space probability density after four time units when evolved using the Fokker-Planck equation incorporating Hamiltonian dynamics,

$\frac{\partial\rho}{\partial t} = {{- \left\{ {\rho,H} \right\}} + {\nabla_{p} \cdot \left( {D{\nabla_{p}\rho}} \right)}}$ with D=0.1. FIG. 46D illustrates an example of the time evolution of the phase space probability density after four time units when evolved using the Fokker-Planck equation incorporating Langevin dynamics,

$\frac{\partial\rho}{\partial t} = {{- \left\{ {\rho,H} \right\}} + {\nabla_{p} \cdot \left( {\gamma p\rho} \right)} + {k_{B}T{\nabla_{p} \cdot \left( {\gamma M{\nabla_{p}\rho}} \right)}}}$ with γ=0.5, T=0.2, and k_(B)=1. FIG. 46B illustrates that the Liouville equation incorporating Hamiltonian dynamics conserves momentum over time, as the initial density in FIG. 46A is only distorted in the q-axis (position). In comparison, FIGS. 46C and 46D illustrate diffusion along the p-axis (velocity) as well, as both evolution equations account for stochastic forces. With the Fokker-Planck equation incorporating Hamiltonian dynamics the density spreads more equally (FIG. 46C) as compared to the Fokker-Planck equation incorporating Langevin dynamics where the density remains more confined (FIG. 46D) due to the additional friction forces.

In some embodiments, the processor of the robot may update the phase space probability distribution when the processor receives readings (or measurements or observations). Any type of reading that may be represented as a probability distribution that describes the likelihood of the state of the robot being in a particular region of the phase space may be used. Readings may include measurements or observations acquired by sensors of the robot or external devices such as a Wi-Fi™ camera. Each reading may provide partial information on the likely region of the state of the robot within the phase space and/or may exclude the state of the robot from being within some region of the phase space. For example, a depth sensor of the robot may detect an obstacle in close proximity to the robot. Based on this measurement and using a map of the phase space, the processor of the robot may reduce the likelihood of the state of the robot being any state of the phase space at a great distance from an obstacle. In another example, a reading of a floor sensor of the robot and a floor map may be used by the processor of the robot to adjust the likelihood of the state of the robot being within the particular region of the phase space coinciding with the type of floor sensed. In an additional example, a measured Wi-Fi™ signal strength and a map of the expected Wi-Fi™ signal strength within the phase space may be used by the processor of the robot to adjust the phase space probability distribution. As a further example, a Wi-Fi™ camera may observe the absence of the robot within a particular room. Based on this observation the processor of the robot may reduce the likelihood of the state of the robot being any state of the phase space that places the robot within the particular room. In some embodiments, the processor generates a simulated representation of the environment for each hypothetical state of the robot. In some embodiments, the processor compares the measurement against each simulated representation of the environment (e.g., a floor map, a spatial map, a Wi-Fi map, etc.) corresponding with a perspective of each of the hypothetical states of the robot. In some embodiments, the processor chooses the state of the robot that makes the most sense as the most feasible state of the robot. In some embodiments, the processor selects additional hypothetical states of the robot as a backup to the most feasible state of the robot.

In some embodiments, the processor of the robot may update the current phase space probability distribution ρ(p, q, t_(i)) by re-weighting the phase space probability distribution with an observation probability distribution m(p, q, t_(i)) according to

${\overset{¯}{\rho}\left( {p,q,t_{i}} \right)} = {\frac{{\rho\left( {p,q,t_{i}} \right)} \cdot {m\left( {p,q,t_{i}} \right)}}{\int{{\rho\left( {p,q,t_{i}} \right)}{m\left( {p,q,t_{i}} \right)}{d\left( {p,q} \right)}}}.}$ In some embodiments, the observation probability distribution may be determined by the processor of the robot for a reading at time t 1 using an inverse sensor model. In some embodiments, wherein the observation probability distribution does not incorporate the confidence or uncertainty of the reading taken, the processor of the robot may incorporate the uncertainty into the observation probability distribution by determining an updated observation probability distribution

$\overset{\hat{}}{m} = {\frac{1 - \alpha}{c} + {\alpha m}}$ that may be used in re-weighting the current phase space probability distribution, wherein α is the confidence in the reading with a value of 0≤α≤1 and c=∫∫dpdq. At any given time, the processor of the robot may estimate a region of the phase space within which the state of the robot is likely to be given the phase space probability distribution at the particular time.

To further explain the localization methods described, examples are provided. In a first example, the processor uses a two-dimensional phase space of the robot, including position q and velocity p. The processor confines the position of the robot q to an interval [0, 10] and the velocity p to an interval [−5, +5], limited by the top speed of the robot, therefore the phase space (p, q) is the rectangle D=[−5, 5]×[0, 10]. The processor uses a Hamiltonian function

${H = \frac{p^{2}}{2m}},$ with mass m and resulting equations of motion {dot over (p)}=0 and

$\overset{˙}{q} = \frac{p}{m}$ to delineate the motion of the robot. The processor adds Langevin-style stochastic forces to obtain motion equations {dot over (p)}=−γp+√{square root over (2γmk_(B)T)}R(t) and

${\overset{˙}{q} = \frac{p}{m}},$ wherein R(t) denotes random forces and m=1. The processor of the robot initially generates a uniform phase space probability distribution over the phase space D. FIGS. 47A-47D illustrate examples of initial phase space probability distributions the processor may use. FIG. 47A illustrates a Gaussian distribution over the phase space, centered at q=5, p=0. The robot is estimated to be in close proximity to the center point with high probability, the probability decreasing exponentially as the distance of the point from the center point increases. FIG. 47B illustrates uniform distribution for q ∈[4.75, 5.25], p ∈[−5, 5] over the phase space, wherein there is no assumption on p and q is equally likely to be in [4.75, 5.25]. FIG. 47C illustrates multiple Gaussian distributions and FIG. 47D illustrates a confined spike at q=5, p=0, indicating that the processor is certain of the state of the robot.

In this example, the processor of the robot evolves the phase space probability distribution over time according to Langevin equation

${\frac{\partial\rho}{\partial t} = {{- \left\{ {\rho,H} \right\}} + {\left( {\gamma\frac{\partial}{\partial p}} \right) \cdot \left( {p\rho} \right)} + {\gamma k_{B}T\frac{\partial^{2}\rho}{\partial p^{2}}}}},$ wherein

$\left\{ {\rho,H} \right\} = {p\frac{\partial\rho}{\partial q}}$ wherein and m=1. Thus, the processor solves

$\frac{\partial\rho}{\partial t} = {{{{- p}\frac{\partial\rho}{\partial q}} + {\gamma\left( {\rho + {p\frac{\partial\rho}{\partial p}}} \right)} + {\gamma k_{B}T\frac{\partial^{2}\rho}{\partial p^{2}}{for}t}} > 0}$ with initial condition ρ(p, q, 0)=ρ₀ and homogenous Neumann perimeters conditions. The perimeter conditions govern what happens when the robot reaches an extreme state. In the position state, this may correspond to the robot reaching a wall, and in the velocity state, it may correspond to the motor limit. The processor of the robot may update the phase space probability distribution each time a new reading is received by the processor. FIGS. 48A and 48B illustrate examples of observation probability distributions for odometry measurements and distance measurements, respectively. FIG. 48A illustrates a narrow Gaussian observation probability distribution for velocity p, reflecting an accurate odometry sensor. Position q is uniform as odometry data does not indicate position. FIG. 48B illustrates a bimodal observation probability distribution for position q including uncertainty for an environment with a wall at q=0 and q=10. Therefore, for a distance measurement of four, the robot is either at q=4 or q=6, resulting in the bi-modal distribution. Velocity p is uniform as distance data does not indicate velocity. In some embodiments, the processor may update the phase space at periodic intervals or at predetermined intervals or points in time. In some embodiments, the processor of the robot may determine an observation probability distribution of a reading using an inverse sensor model and the phase space probability distribution may be updated by the processor by re-weighting it with the observation probability distribution of the reading.

The example described may be extended to a four-dimensional phase space with position q=(x, y) and velocity p=(p_(x), p_(y)). The processor solves this four dimensional example using the Fokker-Planck equation

$\frac{\partial\rho}{\partial t} = {{- \left\{ {\rho,H} \right\}} + {\nabla_{p} \cdot \left( {\gamma p\rho} \right)} + {k_{B}T{\nabla_{p} \cdot \left( {\gamma M{\nabla_{p}\rho}} \right)}}}$ with M=I₂ (2D identity matrix), T=0.1, γ=0.1, and k_(B)=1. In alternative embodiments, the processor uses the Fokker-Planck equation without Hamiltonian and velocity and applies velocity drift field directly through odometry which reduces the dimension by a factor of two. The map of the environment for this example is given in FIG. 49 , wherein the white space is the area accessible to the robot. The map describes the domain for q₁, q₂ ∈D. In this example, the velocity is limited to p₁, p₂ ∈[−1, 1]. The processor models the initial probability density ρ(p, q, 0) as Gaussian, wherein ρ is a four-dimensional function. FIGS. 50A-50C illustrate the evolution of ρ reduced to the q₁, q₂ space at three different time points (i.e., the density integrated over p₁, p₂, ρ_(red)=∫∫ρ(p₁, p₂, q₁, q₂)dp₁dp₂). With increased time, the initial density focused in the middle of the map starts to flow into other rooms. FIGS. 51A-51C illustrate the evolution of ρ reduced to the p₁, q₁ space and 52A-52C illustrate the evolution of ρ reduced to the p₂, q₂ space at the same three different time points to show how velocity evolves over time with position. The four-dimensional example is repeated but with the addition of floor sensor data observations. FIG. 53 illustrates a map of the environment indicating different floor types 5300, 5301, 5302, and 5303 with respect to q₁, q₂. Given that the sensor has no error, the processor may strongly predict the area within which the robot is located based on the measured floor type, at which point all other hypothesized locations of the robot become invalid. For example, the processor may use the distribution

${m\left( {p_{1},p_{2},q_{1},q_{2}} \right)} = \left\{ {\begin{matrix} {{{const} > 0},\ q_{1},{q_{2}{}{{with}{the}{observed}\ {floor}{type}}}} \\ {0,\ {else}} \end{matrix}.} \right.$ If the sensor has an average error rate ϵ, the processor may use the distribution

${m\left( {p_{1},p_{2},q_{1},q_{2}} \right)} = \left\{ \begin{matrix} {{c_{1} > 0},\ q_{1},{q_{2}{}{{with}{the}{observed}\ {floor}{type}}}} \\ {{c_{2} > 0},\ {else}} \end{matrix} \right.$ with c₁, c₂ chosen such that ∫_(p)∫_(D) _(obs) md(q₁, q₂)d(p₁, p₂)=1−ϵ and ∫_(p)∫_(D) _(obs) ^(c)md(q₁, q₂)d(p₁, p₂)=ϵ. D_(obs) is the q₁, q₂ with the observed floor type and D_(obs) ^(c) is its complement. By construction, the distribution m has a probability 1−ϵ for q₁, q₂ ∈D_(obs) and probability ϵ for q₁, q₂ ∈D_(obs) ^(c). Given that the floor sensor measures floor type 5302, the processor updates the probability distribution for position as shown in FIG. 54 . Note that the corners of the distribution were smoothened by the processor using a Gaussian kernel, which corresponds to an increased error rate near the borders of an area. Next, Wi-Fi signal strength observations are considered. Given a map of the expected signal strength, such as that in FIG. 55 , the processor may generate a density describing the possible location of the robot based on a measured Wi-Fi signal strength. The darker areas in FIG. 55 represent stronger Wi-Fi signal strength and the signal source is at q₁, q₂=4.0, 2.0. Given that the robot measures a Wi-Fi signal strength of 0.4, the processor generates the probability distribution for position shown in FIG. 56 . The likely area of the robot is larger since the Wi-Fi signal does not vary much. A wall distance map, such as that shown in FIG. 57 may be used by the processor to approximate the area of the robot given a distance measured. Given that the robot measures a distance of three distance units, the processor generates the probability distribution for position shown in FIG. 58 . For example, the processor evolves the Fokker-Planck equation over time and as observations are successively taken, the processor re-weights the density function with each observation wherein parts that do not match the observation are considered less likely and parts that highly match the observations relatively increase in probability. An example of observations over time may be, t=1: observe p₂=0.75; t=2: observe p₂=0.95 and Wi-Fi signal strength 0.56; t=3: observe wall distance 9.2; t=4: observe floor type 2; t=5: observe floor type 2 and Wi-Fi signal strength 0.28; t=6: observe wall distance 3.5; t=7: observe floor type 4, wall distance 2.5, and Wi-Fi signal strength 0.15; t=8: observe floor type 4, wall distance 4, and Wi-Fi signal strength 0.19; t=8.2: observe floor type 4, wall distance 4, and Wi-Fi signal strength 0.19.

In another example, the robot navigates along a long floor (e.g., x-axis, one-dimensional). The processor models the floor using Liouville's equator

$\frac{\partial\rho}{\partial t} = {- \left\{ {\rho,H} \right\}}$ with Hamiltonian

$H = {\frac{1}{2}p^{2}}$ wherein q ∈[−10, 10] and p ∈ [−5, 5]. The floor has three doors at q₀=−2.5, q₁=0, and q₂=5.0 and the processor of the robot is capable of determining when it is located at a door based on sensor data observed and the momentum of the robot is constant, but unknown. Initially the location of the robot is unknown, therefore the processor generates an initial state density such as that in FIG. 59 . When the processor determines the robot is in front of a door, the possible location of the robot is narrowed down, but not the momentum. Therefore, the processor may update the probability density to that shown in FIG. 60 . The processor evolves the probability density, and after five seconds the probability is as shown in FIG. 61 , wherein the uncertainty in the position space has spread out again given that the momentum is unknown. However, the evolved probability density keeps track of the correlation between position and momentum. When the processor determines the robot is in front of a door again, the probability density is updated to FIG. 62 , wherein the density has significantly narrowed down, indicating a number of peaks representing possible location and momentum combinations of the robot. For the left door, there is equal likelihood for p=0, p=−0.5, and p=−1.5. These momentum values correspond with the robot travelling from one of the three doors in five seconds. This is seen for the other two doors as well.

In some embodiments, the processor may model motion of the robot using equations {dot over (x)}=ν cos ω, {dot over (y)}=ν sin ω, and {dot over (θ)}=ω, wherein ν and ω are translational and rotational velocities, respectively. In some embodiments, translational and rotational velocities of the robot may be computed using observed wheel angular velocities ω_(l) and ω_(r) using

${\begin{pmatrix} v \\ \omega \end{pmatrix} = {{J\begin{pmatrix} \omega_{l} \\ \omega_{r} \end{pmatrix}} = \begin{pmatrix} {r_{l}/2} & {r_{r}/2} \\ {{- r_{l}}/b} & {r_{r}/b} \end{pmatrix}}},$ wherein

is the Jacobian, r_(l) and r_(r) are the left and right wheel radii, respectively and b is the distance between the two wheels. Assuming there are stochastic forces on the wheel velocities, the processor of the robot may evolve the probability density ρ=(x, y, θ, ω_(l), ω_(r)) using

$\frac{\partial\rho}{\partial t} = {{{- \begin{pmatrix} {v\cos\theta} \\ {v\cos\theta} \\ \omega \end{pmatrix}} \cdot {\nabla_{q}\rho}} + {\nabla_{p} \cdot \left( {D{\nabla_{p}\rho}} \right)}}$ wherein

$D = {\frac{1}{2}\sigma_{N}\sigma_{N}^{T}}$ is a 2-by-2 diffusion tensor, q=(x, y, θ) and p=(ω_(l), ω_(r)). In some embodiments, the domain may be obtained by choosing x, y in the map of the environment, θ∈[0, 2π), and ω_(l), ω_(r) as per the robot specifications. In some embodiments, solving the equation may be a challenge given it is five-dimensional. In some embodiments, the model may be reduced by replacing odometry by Gaussian density with mean and variance. This reduces the model to a three-dimensional density ρ=(x, y, θ). In some embodiments, independent equations may be formed for ω_(l), ω_(r) by using odometry and inertial measurement unit observations. For example, taking this approach may reduce the system to one three-dimensional partial differential equation and two ordinary differential equations. The processor may then evolve the probability density over time using

${\frac{\partial\rho}{\partial t} = {{{- \begin{pmatrix} {\overset{¯}{v}\cos\theta} \\ {\overset{¯}{v}\cos\theta} \\ \overset{¯}{\omega} \end{pmatrix}} \cdot {\nabla\rho}} + {\nabla \cdot \left( {D{\nabla\rho}} \right)}}},{t > 0}$ wherein

${D = \begin{pmatrix} {dv^{2}{\cos}^{2}\theta} & {dv^{2}\sin\theta\cos\theta} & 0 \\ {dv^{2}\sin\theta\cos\theta} & {dv^{2}{\sin}^{2}\theta} & 0 \\ 0 & 0 & {d\omega^{2}} \end{pmatrix}},$ ν, ω represent the current mean velocities, and dν, dω the current deviation. In some embodiments, the processor may determine ν, ω from the mean and deviation of the left and right wheel velocities ω_(L) and ω_(R) using

$\begin{pmatrix} \overset{\_}{v} \\ \overset{\_}{\omega} \end{pmatrix} = {{J\begin{pmatrix} {\overset{\_}{\omega}}_{L} \\ {\overset{\_}{\omega}}_{R} \end{pmatrix}}.}$ In some embodiments, the processor may use Neumann perimeters conditions for x, y and periodic perimeters conditions for θ.

In one example, the processor localizes the robot with position coordinate q=(x, y) and momentum coordinate p=(p_(x), p_(y)). For simplification, the mass of the robot is 1.0, the earth is assumed to be planar, and q is a position with reference to some arbitrary point and distance. Thus, the processor evolves the probability density ρ over time according to

${\frac{\partial\rho}{\partial t} = {{{- p} \cdot {\nabla_{q}\rho}} + {\nabla_{p} \cdot \left( {D{\nabla_{p}\rho}} \right)}}},$ wherein D is as defined above. The processor uses a moving grid, wherein the general location of the robot is only known up to a certain accuracy (e.g., 100 m) and the grid is only applied to the known area. The processor moves the grid along as the probability density evolves over time, centering the grid at the approximate center in the q space of the current probability density every couple time units. Given that momentum is constant over time, the processor uses an interval [−15, 15]×[−15, 15], corresponding to maximum speed of 15 m/s in each spatial direction. The processor uses velocity and GPS position observations to increase accuracy of approximated localization of the robot. Velocity measurements provide no information on position, but provide information on p_(x) ²+p_(y) ², the circular probability distribution in the p space, as illustrated in FIG. 63 with |p|=10 and large uncertainty. GPS position measurements provide no direct momentum information but provide a position density. The processor further uses a map to exclude impossible states of the robot. For instance, it is impossible to drive through walls and if the velocity is high there is a higher likelihood that the robot is in specific areas. FIG. 64 illustrates a map used by the processor in this example, wherein white areas 6400 indicate low obstacle density areas and gray areas 6401 indicate high obstacle density areas and the maximum speed in high obstacle density areas is ±5 m/s. Position 6402 is the current probability density collapsed to the q₁, q₂ space. In combining the map information with the velocity observations, the processor determines that it is highly unlikely that with an odometry measurement of |p|=10 that the robot is in a position with high obstacle density. In some embodiments, other types of information may be used to improve accuracy of localization. For example, a map to correlate position and velocity, distance and probability density of other robots using similar technology, Wi-Fi map to extract position, and video footage to extract position.

In some embodiments, the processor may use finite differences methods (FDM) to numerically approximate partial differential equations of the form

${\frac{\partial\rho}{\partial t} = {{- \left\{ {\rho,H} \right\}} + \nabla_{p}}}.$ (D∇_(p)ρ). Numerical approximation may have two components, discretization in space and in time. The finite difference method may rely on discretizing a function on a uniform grid. Derivatives may then be approximated by difference equations. For example, a convection-diffusion equation in one dimension and u(x, t) with velocity ν, diffusion coefficient α,

$\frac{\partial u}{\partial t} = {{a\frac{\partial^{2}u}{\partial x^{2}}} - {v\frac{\partial u}{\partial x}}}$ on a mesh x₀, . . . , x_(J), and times t₀, . . . , t_(N) may be approximated by a recurrence equation of the form

$\frac{u_{j}^{n + 1} - u_{j}^{n}}{k} = {{a\frac{u_{j + 1}^{n} - {2u_{j}^{n}} + u_{j - 1}^{n}}{h^{2}}} - {v\frac{u_{j + 1}^{n} - u_{j - 1}^{n}}{2h}}}$ with space grid size h and time step k and u_(j) ^(n)≈u(x_(j), t_(n)). The left hand side of the recurrence equation is a forward difference at time t_(n), and the right hand side is a second-order central difference and a first-order central difference for the space derivatives at x_(j), wherein

${\frac{u_{j}^{n + 1} - u_{j}^{n}}{k} \approx \frac{\partial{u\left( {x_{j},t_{n}} \right)}}{\partial t}},{\frac{u_{j + 1}^{n} - {2u_{j}^{n}} + u_{j - 1}^{n}}{h^{2}} \approx \frac{\partial^{2}{u\left( {x_{j},t_{n}} \right)}}{\partial x^{2}}},{{{and}{}\frac{u_{j + 1}^{n} - u_{j - 1}^{n}}{2h}} \approx {\frac{\partial{u\left( {x_{j},t_{n}} \right)}}{\partial x}.}}$ This is an explicit method, since the processor may obtain the new approximation u_(j) ^(n+1) without solving any equations. This method is known to be stable for

$h < {\frac{2a}{v}{and}k} < {\frac{h^{2}}{2a}.}$ The stability conditions place limitations on the time step size k which may be a limitation of the explicit method scheme. If instead the processor uses a central difference at time

$t_{n + \frac{1}{2}},$ the recurrence equation is

${\frac{u_{j}^{n + 1} - u_{j}^{n}}{k} = {\frac{1}{2}\left( {{a\frac{u_{j + 1}^{n + 1} - {2u_{j}^{n + 1}} + u_{j - 1}^{n + 1}}{h^{2}}} - {v\frac{u_{j + 1}^{n + 1} - u_{j - 1}^{n + 1}}{2h}} + {a\frac{u_{j + 1}^{n} - {2u_{j}^{n}} + u_{j - 1}^{n}}{h^{2}}} - {v\frac{u_{j + 1}^{n} - u_{j - 1}^{n}}{2h}}} \right)}},$ known as the Crank-Nicolson method. The processor may obtain the new approximation u_(j) ^(n+1) by solving a system of linear equations, thus, the method is implicit and is numerically stable if

$k < {\frac{h^{2}}{a}.}$ In a similar manner, the processor may use a backward difference in time, obtaining a different implicit method

${\frac{u_{j}^{n + 1} - u_{j}^{n}}{k} = {{a\frac{u_{j + 1}^{n + 1} - {2u_{j}^{n + 1}} + u_{j - 1}^{n + 1}}{h^{2}}} - {v\frac{u_{j + 1}^{n + 1} - u_{j - 1}^{n + 1}}{2h}}}},$ which is unconditionally stable for a time step, however, the truncation error may be large. While both implicit methods are less restrictive in terms of time step size, they usually require more computational power as they require solving a system of linear equations at each time step. Further, since the difference equations are based on a uniform grid, the FDM places limitations on the shape of the domain.

In some embodiments, the processor may use finite element methods (FEM) to numerically approximate partial differential equations of the form

${\frac{\partial\rho}{\partial t} = {{- \left\{ {\rho,H} \right\}} + \nabla_{p}}}.$ (D∇_(p) ρ). In general, the finite element method formulation of the problem results in a system of algebraic equations. This yields approximate values of the unknowns at discrete number of points over the domain. To solve the problem, it subdivides a large problem into smaller, simpler parts that are called finite elements. The simple equations that model these finite elements are then assembled into a larger system of equations that model the entire problem. The method may involve constructing a mesh or triangulation of the domain, finding a weak formulation of the partial differential equation (i.e., integration by parts and Green's identity), and deciding for solution space (e.g., piecewise linear on mesh elements). This leads to a discretized version in form of a linear equation. Some advantages over FDM includes complicated geometries, more choice in approximation leads, and, in general, a higher quality of approximation. For example, the processor may use the partial differential equation

${\frac{\partial\rho}{\partial t} = {L\rho}},$ with differential operator, e.g., L=−{·, H}+∇_(p)·(D∇_(p)). The processor may discretize the abstract equation in space (e.g., by FEM or FDM

${\frac{\partial\overset{¯}{\rho}}{\partial t} = {\overset{¯}{L}\overset{¯}{\rho}}},$ wherein ρ, L are the projections of ρ, L on the discretized space. The processor may discretize the equation in time using a numerical time integrator (e.g., Crank-Nicolson)

${\frac{\rho^{{- n} + 1} - \rho^{- n}}{h} = {\frac{1}{2}\left( {{\overset{¯}{L}{\overset{¯}{\rho}}^{{- n} + 1}} + {\overset{¯}{L}{\overset{¯}{\rho}}^{- n}}} \right)}},$ leading to the equation

${{\left( {I - {\frac{h}{2}\overset{\_}{L}}} \right){\overset{\_}{\rho}}^{{- n} + 1}} = {\left( {I + {\frac{h}{2}\overset{\_}{L}}} \right){\overset{\_}{\rho}}^{- n}}},$ which the processor may solve. In a fully discretized system, this is a linear equation. Depending on the space and discretization, this will be a banded, sparse matrix. In some embodiments, the processor may employ alternating direction implicit (ADI) splitting to ease the solving process. In FEM, the processor may discretize the space using a mesh, construct a weak formulation involving a test space, and solve its variational form. In FDM, the processor may discretize the derivatives using differences on a lattice grid of the domain. In some instances, the processor may implement FEM/FDM with backward differential formulation (BDF)/Radau (Marlis recommendation), for example mesh generation then construct and solve variational problem with backwards Euler. In other instances, the processor may implement FDM with ADI, resulting in a banded, tri-diagonal, symmetric, linear system. The processor may use an upwind scheme if Peclet number (i.e., ratio advection to diffusion) is larger than 2 or smaller than −2.

Perimeter conditions may be essential in solving the partial differential equations. Perimeter conditions are a set of constraints that determine what happens at the perimeters of the domain while the partial differential equation describe the behaviour within the domain. In some embodiments, the processor may use one or more the following perimeters conditions: reflecting, zero-flux (i.e., homogenous Neumann perimeters conditions) for

$\frac{\partial\rho}{\partial\overset{\rightarrow}{n}} = 0$ p, q ∈ ∂D, {right arrow over (n)} unit normal vector on perimeters; absorbing perimeter conditions (i.e., homogenous Dirichlet perimeters conditions) ρ=0 for p, q ∈ ∂D; and constant concentration perimeter conditions (i.e., Dirichlet) ρ=ρ₀ for p, q ∈ ∂D. To integrate the perimeter conditions into FDM, the processor modifies the difference equations on the perimeters, and when using FEM, they become part of the weak form (i.e., integration by parts) or are integrated in the solution space. In some embodiments, the processor may use Fenics for an efficient solution to partial differential equations.

In some embodiments, the processor may use quantum mechanics to localize the robot. In some embodiments, the processor of the robot may determine a probability density over all possible states of the robot using a complex-valued wave function for a single-particle system Ψ({right arrow over (r)}, t), wherein {right arrow over (r)} may be a vector of space coordinates. In some embodiments, the wave function ω({right arrow over (r)}, t) may be proportional to the probability density that the particle will be found at a position {right arrow over (r)}, i.e. ρ({right arrow over (r)}, t)=|Ψ({right arrow over (r)}, t)|². In some embodiments, the processor of the robot may normalize the wave function which is equal to the total probability of finding the particle, or in this case the robot, somewhere. The total probability of finding the robot somewhere may add up to unity ∫|Ψ({right arrow over (r)}, t)|² dr=1. In some embodiments, the processor of the robot may apply Fourier transform to the wave function Ψ({right arrow over (r)}, t) to yield the wave function Φ({right arrow over (p)}, t) in the momentum space, with associated momentum probability distribution σ({right arrow over (p)}, t)=Φ|({right arrow over (p)}, t)|². In some embodiments, the processor may evolve the wave function Ψ({right arrow over (r)}, t) using Schrödinger equation

${{i\hslash{\frac{\partial}{\partial t}{\Psi\left( {\overset{\rightarrow}{r},\ t} \right)}}} = {\left\lbrack {{- \frac{\hslash^{2}}{2m}}{\nabla^{2}{+ {V\left( \overset{\rightarrow}{r} \right)}}}} \right\rbrack{\Psi\left( {\overset{\rightarrow}{r},\ t} \right)}}},$ wherein the bracketed object is the Hamilton operator

${\overset{\hat{}}{H} = {{- \frac{\hslash^{2}}{2m}}{\nabla^{2}{+ {V\left( \overset{\rightarrow}{r} \right)}}}}},$ i is the imaginary unit, ℏ is the reduced Planck constant, ∇² is the Laplacian, and V({right arrow over (r)}) is the potential. An operator is a generalization of the concept of a function and transforms one function into another function. For example, the momentum operator {circumflex over (p)}=−iℏ∇ explaining why

${- \frac{\hslash^{2}}{2m}}\nabla^{2}$ corresponds to kinetic energy. The Hamiltonian function

$H = {\frac{p^{2}}{2m} + {V\left( \overset{\rightarrow}{r} \right)}}$ has corresponding Hamilton operator

$\overset{\hat{}}{H} = {{- \frac{\hslash^{2}}{2m}}{\nabla^{2}{+ {{V\left( \overset{\rightarrow}{r} \right)}.}}}}$ For conservative systems (constant energy), the time-dependent factor may be separated from the wave function (e.g.,

${\Psi\left( {\overset{\rightarrow}{r},t} \right)} = {{\Phi\left( \overset{\rightarrow}{r} \right)}e^{{- \frac{iEt}{\hslash}},}}$ giving the time-independent Schrodinger equation

${{\left\lbrack {{- \frac{\hslash^{2}}{2m}}{\nabla^{2}{+ {V\left( \overset{\rightarrow}{r} \right)}}}} \right\rbrack{\Phi\left( \overset{\rightarrow}{r} \right)}} = {E{\Phi\left( \overset{\rightarrow}{r} \right)}}},$ or otherwise ĤΦ=EΦ, an eigenvalue equation with eigenfunctions and eigenvalues. The eigenvalue equation may provide a basis given by the eigenfunctions {100} of the Hamiltonian. Therefore, in some embodiments, the wave function may be given by Ψ({right arrow over (r)}, t)=Σ_(k)c_(k)(t)φ_(k)({right arrow over (r)}), corresponding to expressing the wave function in the basis given by energy eigenfunctions. Substituting this equation into the Schrodinger equation

${c_{k}(t)} = {{c_{k}(0)}e^{- \frac{{iE}_{k}t}{\hslash}}}$ is obtained, wherein E_(k) is the eigen-energy to the eigenfunction φ_(k). For example, the probability of measuring a certain energy E_(k) at time t may be given by the coefficient of the eigenfunction

$\varphi_{k},{{❘{c_{k}(t)}❘}^{2} = {{❘{{c_{k}(0)}e^{- \frac{{iE}_{k}t}{\hslash}}}❘}^{2} = {{❘{c_{k}(0)}❘}^{2}.}}}$ Thus, the probability for measuring the given energy is constant over time. However, this may only be true for the energy eigenvalues, not for other observables. Instead, the probability of finding the system at a certain position ρ({right arrow over (r)})=|Ψ({right arrow over (r)}, t)|² may be used.

In some embodiments, the wave function ψ may be an element of a complex Hilbert space H, which is a complete inner product space. Every physical property is associated with a linear, Hermitian operator acting on that Hilbert space. A wave function, or quantum state, may be regarded as an abstract vector in a Hilbert space. In some embodiments, ψ may be denoted by the symbol |ψ

(i.e., ket), and correspondingly, the complex conjugate ϕ may be denoted by

ϕ| (i.e., bra). The integral over the product of two functions may be analogous to an inner product of abstract vectors, ∫ϕ*ψd τ=

ϕ|·|ψ

. In some embodiments,

ϕ| and |ψ

may be state vectors of a system and the processor may determine the probability of finding

ϕ| in state |ψ

using p(

ϕ|, |ϕ)

=|

ϕ|ψ

|². For a Hermitian operator Â eigenkets and eigenvalues may be denoted A|n)=a_(n)|n), wherein |n

is the eigenket associated with the eigenvalue a_(n). For a Hermitian operator, eigenvalues are real numbers, eigenkets corresponding to different eigenvalues are orthogonal, eigenvalues associated with eigenkets are the same as the eigenvalues associated with eigenbras, i.e.

n|A=

n|a_(n). For every physical property (energy, position, momentum, angular momentum, etc.) there may exist an associated linear, Hermitian operator Â (called am observable) which acts on the Hilbert space H. Given A has eigenvalues a_(n) and eigenvectors |n

, and a system in state |ϕ

, the processor may determine the probability of obtaining a_(n) as an outcome of a measurement of A using p(a_(n))=|

n|ϕ

|². In some embodiments, the processor may evolve the time-dependent Schrodinger equation using

$\left. {{i\hslash\frac{\left. {\partial{❘\psi}} \right\rangle}{\partial t}} = \left. \overset{\hat{}}{H} \middle| \psi \right.} \right\rangle.$ Given a state |ϕ

and a measurement of the observable A, the processor may determine the expectation value of A using

A

=

ϕ|ϕ

, corresponding to

$\left\langle A \right\rangle = \frac{\int{\phi^{*}{Â\phi}d\tau}}{\int{\phi^{*}\phi d\tau}}$ for observation operator Â and wave function ϕ. In some embodiments, the processor may update the wave function when observing some observable by collapsing the wave function to the eigenfunctions, or eigenspace, corresponding to the observed eigenvalue.

As described above, for localization of the robot, the processor may evolve the wave function Ψ({right arrow over (r)}, t) using the Schrödinger equation

${i\hslash{\frac{\partial}{\partial t}{\Psi\left( {\overset{\rightarrow}{r},t} \right)}}} = {\left\lbrack {{- \frac{\hslash^{2}}{2m}}{\nabla^{2}{+ {V\left( \overset{\rightarrow}{r} \right)}}}} \right\rbrack{{\Psi\left( {\overset{\rightarrow}{r},\ t} \right)}.}}$ In some embodiments, a solution may be written in terms of eigenfunctions ψ_(n) with eigenvalues E_(n) of the time-independent Schrodinger equation Hψ_(n)=E_(n)ψ_(n), wherein Ψ({right arrow over (r)}, t)=Σ_(c) _(n) c_(n) e^(−iE) ^(n) ^(t/h)ψ_(n) and c_(n)=∫Ψ({right arrow over (r)}, 0)ψ_(n)*dr. In some embodiments, the time evolution may be expressed as a time evolution via a unitary operator U(t), Ψ({right arrow over (r)}, t)=U(t)Ψ({right arrow over (r)}, 0) wherein U(t)=e^(−iHt/h). In some embodiments, the probability density of the Hilbert space may be updated by the processor of the robot each time an observation or measurement is received by the processor of the robot. For each observation with observation operator A the processor of the robot may perform an eigen-decomposition Aω_(n)=a_(n)ω_(n), wherein the eigenvalue corresponds to the observed quantity. In some embodiments, the processor may observe a value a with probability 0≤p≤1. In some embodiments, wherein the operator has a finite spectrum or a single eigenvalue is observed, the processor of the robot may collapse to the eigenfunction(s) with corresponding probability

$\left. {\Psi\left( {\overset{\rightarrow}{r},t} \right)}\rightarrow{\gamma{\sum}_{n = 1}^{N}{p\left( a_{n} \right)}d_{n}\omega_{n}} \right.,$ wherein d_(n)=∫ω_(n)*Ψdr, p(α) is the probability of observing value α, and γ is a normalization constant. In some embodiments, wherein the operator has continuous spectrum, the summation may be replaced by an integration Ψ({right arrow over (r)}, t)→γ∫p(α)d_(n)ω_(n) dα, wherein d_(n)=∫ω_(n)*Ψdr.

For example, consider a robot confined to move within an interval

$\left\lbrack {{- \frac{1}{2}},\frac{1}{2}} \right\rbrack.$ For simplicity, the processor sets ℏ=m=1, and an infinite well potential and the regular kinetic energy term are assumed. The processor solves the time-independent Schrodinger equations, resulting in wave functions

$\psi_{n} = \left\{ {\begin{matrix} {{\sqrt{2}{\sin\left( {k_{n}\left( {x - \frac{1}{2}} \right)} \right)}e^{{- i}\omega_{n}t}},\ {{- \frac{1}{2}} < x < \frac{1}{2}}} \\ {0,\ {otherwise}} \end{matrix},} \right.$ wherein k_(n)=nπ and E_(n)=ω_(n)=n²π². In the momentum space this corresponds to the wave functions

${\phi_{n}\left( {p,t} \right)} = {{\frac{1}{\sqrt{2\pi}}{\int_{- \infty}^{\infty}{{\psi_{n}\left( {x,t} \right)}e^{{- i}px}{dx}}}} = {\frac{1}{\sqrt{\pi}}\frac{n\pi}{{n\pi} + p}\sin{{c\left( {\frac{1}{2}\left( {{n\pi} - p} \right)} \right)}.}}}$ The processor takes suitable functions and computes an expansion in eigenfunctions. Given a vector of coefficients, the processor computes the time evolution of that wave function in eigenbasis. In another example, consider a robot free to move on an x-axis. For simplicity, the processor sets ℏ=m=1. The processor solves the time-independent Schrodinger equations, resulting in wave functions

${{\psi_{E}\left( {x,\ t} \right)} = {Ae^{\frac{\overset{˙}{\iota}({{px} - {Et}})}{\hslash}}}},$ wherein energy

$E = \frac{\hslash^{2}k^{2}}{2m}$ and momentum p=ℏk. For energy E there are two independent, valid functions with ±p. Given the wave function in the position space, in the momentum space, the corresponding wave functions are

${{\phi_{E}\left( {p,t} \right)} = e^{\frac{i({{px} - {Et}})}{\hslash}}},$ which are the same as the energy eigenfunctions. For a given initial wave function ψ(x, 0), the processor expands the wave function into momentum/energy eigenfunctions

${{\phi(p)} = {\frac{1}{\sqrt{2\pi\hslash}}{\int{{\psi\left( {x,0} \right)}e^{- \frac{\overset{˙}{\iota}px}{\hslash}}dx}}}},$ then the processor gets time dependence by taking the inverse Fourier resulting in

${\psi\left( {x,t} \right)} = {\frac{1}{\sqrt{2{\pi\hslash}}}{\int{{\phi(p)}e^{\frac{ipx}{\hslash}}e^{- \frac{iEt}{\hslash}}{{dp}.}}}}$ An example of a common type of initial wave function is a Gaussian wave packet, consisting of a momentum eigenfunctions multiplied by a Gaussian in position space

${{\psi(x)} = {Ae^{- {(\frac{x}{a})}^{2}}e^{\frac{{ip}_{0}x}{\hslash}}}},$ wherein p₀ is the wave function's average momentum value and α is a rough measure of the width of the packet. In the momentum space, this wave function has the form

${{\phi(p)} = {Be^{- {(\frac{a({p - p_{0}})}{2h})}^{2}}}},$ which is a Gaussian function of momentum, centered on p₀ with approximate width

$\frac{2\hslash}{a}.$ Note Heisenberg's uncertainty principle wherein in the position space width is −α, and in the momentum space is ˜1/α. FIGS. 65A and 65B illustrate an example of a wave packet at a first time point for ψ(x) and ϕ(p), respectively, with x₀, p₀=0, 2, ℏ=0.1, m=1, and α=3, wherein 6500 are real parts and 6501 are imaginary parts. As time passes, the peak moves with constant velocity

$\frac{p_{0}}{m}$ and the width of the wave packet in the position space increases. This happens because the different momentum components of the packet move with different velocities. In the momentum space, the probability density |ϕ(p, t)|² stays constant over time. See FIGS. 65C and 65D for the same wave packet at time t=2.

When modeling the robot using quantum physics, and the processor observes some observable, the processor may collapse the wave function to the subspace of the observation. For example, consider the case wherein the processor observes the momentum of a wave packet. The processor expresses the uncertainty of the measurement by a function ƒ(p) (i.e., the probability that the system has momentum p), wherein ƒ is normalized. The probability distribution of momentum in this example is given by a Gaussian distribution centered around p=2.5 with σ=0.05, a strong assumption that the momentum is 2.5. Since the observation operator is the momentum operator, the wave function expressed in terms of the eigenfunctions of the observation operator is ϕ(p, t). The processor projects ϕ(p, t) into the observation space with probability ƒ by determining {tilde over (ϕ)}(p, t)=ƒ(p)ϕ(p, t). The processor normalizes the updated {tilde over (ϕ)} and takes the inverse Fourier transform to obtain the wave function in the position space. FIGS. 66A, 66B, 66C, 66D, and 66E illustrate the initial wave function in the position space ψ(x), the initial wave function in the momentum space ϕ(p), the observation density in the momentum space, the updated wave function in the momentum space {tilde over (ϕ)}(p, t) after the observation, and the wave function in the position space ψ(x) after observing the momentum, respectively, at time t=2, with x₀, p₀=0, 2, ℏ=0.1, m=1, and α=3. Note that in each figure the darker plots are the real parts while the lighter plots are the imaginary parts. The resulting wave function in the position space (FIG. 66D) may be unexpected after observing a very narrow momentum density (FIG. 66C) as it concludes that the position must have spread further out from the original wave function in the position space (FIG. 66A). This effect may be due to Heisenberg's uncertainty principle. With decreasing ℏ this effect diminishes, as can be seen in FIGS. 67A-67E and FIGS. 68A-68E, illustrating the same as FIGS. 66A-66E but with ℏ=0.05 and ℏ=0.001, respectively. Similar to observing momentum, position may also be observed and incorporated as illustrated in FIGS. 69A-69E which illustrate the initial wave function in the position space ψ(x), the initial wave function in the momentum space ϕ(p), the observation density in the position space, the updated wave function in the momentum space {tilde over (ϕ)}(x, t) after the observation, and the wave function in the position space ψ(p) after observing the position, respectively, at time t=2, with x₀, p₀=0, 2, ℏ=0.1, m=1, and α=3.

In quantum mechanics, wave functions represent probability amplitude of finding the system in some state. Physical pure states in quantum mechanics may be represented as unit-norm vectors in a special complex Hilbert space and time evolution in this vector space may be given by application of the evolution operator. Further, in quantum mechanics, any observable should be associated with a self-adjoint linear operator which must yield real eigenvalues, e.g. they must be Hermitian. The probability of each eigenvalue may be related to the projection of the physical state on the subspace related to that eigenvalue and observables may be differential operators. For example, a robot navigates along a one-dimensional floor that includes three doors at doors at x₀=−2.5, x₁=0, and x₂=5.0. The processor of the robot is capable of determining when it is located at a door based on sensor data observed and the momentum of the robot is constant, but unknown. Initially the location of the robot is unknown, therefore the processor generates initial wave functions of the state shown in FIGS. 70A and 70B. When the processor determines the robot is in front of a door, the possible position of the robot is narrowed down to three possible positions, but not the momentum, resulting in wave functions shown in FIGS. 71A and 71B. The processor evolves the wave functions with a Hamiltonian operator, and after five seconds the wave functions are as shown in FIGS. 72A and 72B, wherein the position space has spread out again given that the momentum is unknown. However, the evolved probability density keeps track of the correlation between position and momentum. When the processor determines the robot is in front of a door again, the wave functions are updated to FIGS. 73A and 73B, wherein the wave functions have significantly narrowed down, indicating a number of peaks representing possible position and momentum combinations of the robot. And in fact, if the processor observes another observation, such as momentum p=1.0 at t=5.0, the wave function in the position space also collapses to the only remaining possible combination, the location near x=5.0, as shown in FIGS. 74A and 74B. The processor collapses the momentum wave function accordingly. Also, the processor reduces the position wave function to a peak at x=5.0. Given constant momentum, the momentum observation of p=1.0, and that the two door observations were 5 seconds apart, the position x=5.0 is the only remaining valid position hypothesis. FIGS. 74C and 74D illustrate the resulting wave function for a momentum observation of p=0.0 at t=5.0 instead. FIGS. 74E and 74F illustrate the resulting wave function for a momentum observation of p=−1.5 at t=5.0 instead. FIGS. 74G and 74H illustrate the resulting wave function for a momentum observation of p=0.5 at t=5.0 instead. Similarly, the processor collapses the momentum wave function when position is observed instead of momentum. FIGS. 75A and 75B illustrate the resulting wave function for a position observation of x=0.0 at t=5.0 instead. FIGS. 75C and 75D illustrate the resulting wave function for a position observation of x=−2.5 at t=5.0 instead. FIGS. 75E and 75F illustrate the resulting wave function for a position observation of x=5.0 at t=5.0 instead.

In some embodiments, the processor may simulate multiple robots located in different possible locations within the environment. In some embodiments, the processor may view the environment from the perspective of each different simulated robot. In some embodiments, the collection of simulated robots may form an ensemble. In some embodiments, the processor may evolve the location of each simulated robot or the ensemble over time. In some embodiments, the range of movement of each simulated robot may be different. In some embodiments, the processor may view the environment from the FOV of each simulated robot, each simulated robot having a slightly different map of the environment based on their simulated location and FOV. In some embodiments, the collection of simulated robots may form an approximate region within which the robot is truly located. In some embodiments, the true location of the robot is one of the simulated robots. In some embodiments, when a measurement of the environment is taken, the processor may check the measurement of the environment against the map of the environment of each of the simulated robots. In some embodiments, the processor may predict the robot is truly located in the location of the simulated robot having a map that best matches the measurement of the environment. In some embodiments, the simulated robot which the processor believes to be the true robot may change or may remain the same as new measurements are taken and the ensemble evolves over time. In some embodiments, the ensemble of simulated robots may remain together as the ensemble evolves over time. In some embodiments, the overall energy of the collection of simulated robots may remain constant in each timestamp, however the distribution of energy to move each simulated robot forward during evolution may not be distributed evenly among the simulated robots. For example, in one instance a simulated robot may end up much further away than the remaining simulated robots or too far to the right or left, however in future instances and as the ensemble evolves may become close to the group of simulated robots again. In some embodiments, the ensemble may evolve to most closely match the sensor readings, such as a gyroscope or optical sensor. In some embodiments, the evolution of the location of simulated robots may be limited based on characteristics of the physical robot. For example, a robot may have limited speed and limited rotation of the wheels, therefor it would be impossible for the robot to move two meters, for example, in between time steps. In another example, the robot may only be located in certain areas of an environment, where it may be impossible for the robot to be located in areas where an obstacle is located for example. In some embodiments, this method may be used to hold back certain elements or modify the overall understanding of the environment. For example, when the processor examines a total of ten simulated robots one by one against a measurement, and selects one simulated robot as the true robot, the processor filters out nine simulated robots.

In some embodiments, the FOV of each simulated robot may not include the exact same features as one another. In some embodiments, the processor may save the FOV of each of the simulated robots in memory. In some embodiments, the processor may combine the FOVs of each simulated robot to create a FOV of the ensemble using methods such as least squares methods. In some embodiments, the processor may track the FOV of each of the simulated robots individually and the FOV of the entire ensemble. In some embodiments, other methods may be used to create the FOV of the ensemble (or a portion of the ensemble). For example, a classifier AI algorithm may be used, such as naive Bayes classifier, least squares support vector machines, k-nearest neighbor, decision trees, and neural networks. In some embodiments, more than one FOV of the ensemble (or a portion of the ensemble) may be generated and tracked by the processor, each FOV created using a different method. For example, the processor may track the FOV of ten simulated robots and ten differently generated FOVs of the ensemble. At each measurement timestamp, the processor may examine the measurement against the FOV of the ten simulated robots and/or the ten differently generated FOVs of the ensemble and may choose any of these 20 possible FOVs as the ground truth. In some embodiments, the processor may examine the 20 FOVs instead of the FOVs of the simulated robots and choose a derivative as the ground truth. The number of simulated robots and/or the number of generated FOVs may vary. During mapping for example, the processor may take a first field of view of the sensor and calculate a FOV for the ensemble or each individual observer (simulated robot) inside the ensemble and combine it with the second field of view captured by the sensor for the ensemble or each individual observer inside the ensemble. The processor may switch between the FOV of each observer (e.g., like multiple CCTV cameras in an environment that an operator may switch between) and/or one or more FOVs of the ensemble (or a portion of the ensemble) and chooses the FOVs that are more probable to be close to ground truth. At each time iteration, the FOV of each observer and/or ensemble may evolve into being closer to ground truth.

In some embodiments, simulated robots may be divided in two or more classes. For example, simulated robots may be classified based on their reliability, such as good reliability, bad reliability, or average reliability or based on their speed, such as fast and slow. Classes that move to a side a lot may be used. Any classification system may be created, such as linear classifiers like Fisher's linear discriminant, logistic regression, naive Bayes classifier and perceptron, support vector machines like least squares support vector machines, quadratic classifiers, kernel estimation like k-nearest neighbor, boosting (meta-algorithm), decision trees like random forests, neural networks, and learning vector quantization. In some embodiments, each of the classes may evolve differently. For example, for fast speed and slow speed classes, each of the classes may move differently wherein the simulated robots in the fast class will move very fast and will be ahead of the other simulated robots in the slow class that move slower and fall behind. The kind and time of evolution may have different impact on different simulated robots within the ensemble. The evolution of the ensemble as a whole may or may not remain the same. The ensemble may be homogenous or non-homogenous.

In some embodiments, samples may be taken from the phase space. In some embodiments, the intervals at which samples are taken may be fixed or dynamic or machine learned. In a fixed interval sampling system, a time may be preset. In a dynamic interval system, the sampling frequency may depend on factors such as speed or how smooth the floor is and other parameters. For example, as the speed of the robot increases, more samples may be taken. Or more samples may be taken when the robot is traveling on rough terrain. In a machine learned system, the frequency of sampling may depend on predicted drift. For example, if in previous timestamps the measurements taken indicate that the robot has reached the intended position fairly well, the frequency of sampling may be reduced. In some embodiments, the above explained dynamic system may be equally used to determine the size of the ensemble. If, for example, in previous timestamps the measurements taken indicate that the robot has reached the intended position fairly well, a smaller ensemble may be used to correct the knowledge of where the robot is. In some embodiments, the ensemble may be regenerated at each interval. In some embodiments, a portion of the ensemble may be regenerated. In some embodiments, a portion of the ensemble that is more likely to depict ground truth may be preserved and the other portion regenerated. In some embodiments, the ensemble may not be regenerated but one of the observers (simulated robots) in the ensemble that is more likely to be ground truth may be chosen as the most feasible representation of the true robot. In some embodiments, observers (simulated robots) in the ensemble may take part in becoming the most feasible representation of the true robot based on how their individual description of the surrounding fits with the measurement taken.

In some embodiments, the processor may generate an ensemble of hypothetical positions of various simulated robots within the environment. In some embodiments, the processor may generate a simulated representation of the environment for each hypothetical position of the robot from the perspective corresponding with each hypothetical position. In some embodiments, the processor may compare the measurement against each simulated representation of the environment (e.g., a floor type map, a spatial map, a Wi-Fi map, etc.) corresponding with a perspective of each of the hypothetical positions of the robot. In some embodiments, the processor may choose the hypothetical position of the robot that makes the most sense as the most feasible position of the robot. In some embodiments, the processor may select additional hypothetical positions of the robot as a backup to the most feasible position of the robot. In some embodiments, the processor may nominate one or more hypothetical positions as a possible leader or otherwise a feasible position of the robot. In some embodiments, the processor may nominate a hypothetical position of the robot as a possible leader when the measurement fits well with the simulated representation of the environment corresponding with the perspective of the hypothetical position. In some embodiments, the processor may defer a nomination of a hypothetical position to other hypothetical positions of the robot. In some embodiments, the hypothetical positions with the highest numbers of deferrals may be chosen as possible leaders. In some embodiments, the process of comparing measurements to simulated representations of the environment corresponding with the perspectives of different hypothetical positions of the robot, nominating hypothetical positions as possible leaders, and choosing the hypothetical position that is the most feasible position of the robot may be iterative. In some cases, the processor may select the hypothetical position with the lowest deviation between the measurement and the simulated representation of the environment corresponding with the perspective of the hypothetical position as the leader. In some embodiments, the processor may store one or more hypothetical positions that are not elected as leader for another round of iteration after another movement of the robot. In other cases, the processor may eliminate one or more hypothetical positions that are not elected as leader or eliminates a portion and stores a portion for the next round of iteration. In some cases, the processor may choose the portion of the one or more hypothetical positions that are stored based on one or more criteria. In some cases, the processor may choose the portion of hypothetical positions that are stored randomly and based on one or more criteria. In some cases, the processor may eliminate some of the hypothetical positions of the robot that pass the one or more criteria. In some embodiments, the processor may evolve the ensemble of hypothetical positions of the robot similar to a genetic algorithm. In some embodiments, the processor may use a MDP to reduce the error between the measurement and the representation of the environment corresponding with each hypothetical position over time, thereby improving the chances of each hypothetical position in becoming or remaining leader. In some cases, the processor may apply game theory to the hypothetical positions of the robots, such that hypothetical positions compete against one another in becoming or remaining leader. In some embodiments, hypothetical positions may compete against one another and the ensemble becomes an equilibrium wherein the leader following a policy (a) remains leader while the other hypothetical positions maintain their current positions the majority of the time.

In some embodiments, the robot undocks to execute a task. In some embodiments, the processor performs a seed localization while the robot perceives the surroundings. In some embodiments, the processor uses a Chi square test to select a subset of data points that may be useful in localizing the robot or generating the map. In some embodiments, the processor of the robot generates a map of the environment after performing a seed localization. In some embodiments, the localization of the robot is improved iteratively. In some embodiments, the processor aggregates data into the map as it is collected. In some embodiments, the processor transmits the map to an application of a communication device (e.g., for a user to access and view) after the task is complete.

In some embodiments, the processor generates a spatial representation of the environment in the form of a point cloud of sensor data. In some embodiments, the processor of the robot may approximate perimeters of the environment by determining perimeters that fit all constraints. For example, FIG. 76A illustrates point cloud 7600 based on data from sensors of robot 7601 and approximated perimeters 7602 fitted to point cloud 7600 for walls 7603 of an environment 7604. In some embodiments, the processor of the robot may employ a Monte Carlo method. In some embodiments, more than one possible perimeter 7602 corresponding with more than one possible position of the robot 7601 may be considered as illustrated in FIG. 76B. This process may be computationally expensive. In some embodiments, the processor of the robot may use a statistical test to filter out points from the point cloud that do not provide statistically significant information. For example, FIG. 77A illustrates a point cloud 7700 and FIG. 77B illustrates points 7701 that may be filtered out after determining that they do not provide significant information. In some embodiments, some points may be statistically insignificant when overlapping data is merged together. In some embodiments, the processor of the robot localizes the robot against the subset of points remaining after filtering out points that may not provide significant information. In some embodiments, after localization, the processor creates the map using all points from the point cloud. Since the subset of points used in localizing the robot results in a lower resolution map the area within which the robot may be located is larger than the actual size of the robot. FIG. 78 illustrates a low resolution point cloud map 7800 with an area 7801 including possible locations of the robot, which collectively from an larger area than the actual size of the robot. In some embodiments, after seed localization, the processor creates a map including all points of the point cloud from each of the possible locations of the robot. In some embodiments, the precise location of the robot may be chosen as a location common to all possible locations of the robot. In some embodiments, the processor of the robot may determine the overlap of all the approximated locations of the robot and may approximate the precise location of the robot as a location corresponding with the overlap. FIG. 79A illustrates two possible locations (A and B) of the robot and the overlap 7900 between the two may be approximated as the precise location of the robot. FIG. 79B illustrates an example of three locations of the robot 7901, 7902, and 7903 approximated based on sensor data and overlap 7904 of the three locations 7901, 7902, and 7903. In some embodiments, after determining a precise location of the robot, the processor creates the map using all points from the point cloud based on the location of the robot relative to the subset of points. In some embodiments, the processor examines all points in the point cloud. In some embodiments, the processor chooses a subset of points from the point cloud to examine when there is high confidence that there are enough points to represent the ground truth and avoid any loss. In some embodiments, the processor of the robot may regenerate the exact original point cloud when loss free. In some embodiments, the processor accepts a loss as a trade-off. In some embodiments, this process may be repeated at a higher resolution.

In some embodiments, the processor of the robot loses the localization of the robot when facing difficult areas to navigate. For example, the processor may lose localization of the robot when the robot gets stuck on a floor transition or when the robot struggles to release itself from an object entangled with a brush or wheel of the robot. In some embodiments, the processor may expect a difficult climb and may increase the driving speed of the robot prior to approaching the climb. In some embodiments, the processor increases the driving speed of all the motors of the robot when an unsuccessful climb occurs. For example, if a robot gets stuck on a transition, the processor may increase the speed of all the motors of the robot to their respective maximum speeds. In some embodiments, motors of the robot may include at least one of a side brush motor and a main brush motor. In some embodiments, the processor may reverse a direction of rotation of at least one motor of the robot (e.g., clockwise or counterclockwise) or may alternate the direction of rotation of at least one motor of the robot. In some embodiments, adjusting the speed or direction of rotation of at least one motor of the robot may move the robot and/or items around the robot such that the robot may transition to an improved situation.

In some embodiments, the processor of the robot may attempt to regain its localization after losing the localization of the robot. In some embodiments, the processor of the robot may attempt to regain localization multiple times using the same method or alternative methods consecutively. In some embodiments, the processor of the robot may attempt methods that are highly likely to yield a result before trying other, less successful methods. In some embodiments, the processor of the robot may restart mapping and localization if localization cannot be regained.

In some embodiments, the processor associates properties with each room as the robot discovers rooms one by one. In some embodiments, the properties are stored in a graph or a stack, such the processor of the robot may regain localization if the robot becomes lost within a room. For example, if the processor of the robot loses localization within a room, the robot may have to restart coverage within that room, however as soon as the robot exits the room, assuming it exits from the same door it entered, the processor may know the previous room based on the stack structure and thus regain localization. In some embodiments, the processor of the robot may lose localization within a room but still have knowledge of which room it is within. In some embodiments, the processor may execute a new re-localization with respect to the room without performing a new re-localization for the entire environment. In such scenarios, the robot may perform a new complete coverage within the room. Some overlap with previously covered areas within the room may occur, however, after coverage of the room is complete the robot may continue to cover other areas of the environment purposefully. In some embodiments, the processor of the robot may determine if a room is known or unknown. In some embodiments, the processor may compare characteristics of the room against characteristics of known rooms. For example, location of a door in relation to a room, size of a room, or other characteristics may be used to determine if the robot has been in an area or not. In some embodiments, the processor adjusts the orientation of the map prior to performing comparisons. In some embodiments, the processor may use various map resolutions of a room when performing comparisons. For example, possible candidates may be short listed using a low resolution map to allow for fast match finding then may be narrowed down further using higher resolution maps. In some embodiments, a full stack including a room identified by the processor as having been previously visited may be candidates of having been previously visited as well. In such a case, the processor may use a new stack to discover new areas. In some instances, graph theory allows for in depth analytics of these situations.

In some embodiments, the robot may not begin performing work from a last location saved in the stored map. Such scenarios may occur when, for example, the robot is not located within a previously stored map. For example, a robot may clean a first floor of a two-story home, and thus the stored map may only reflect the first floor of the home. A user may place the robot on a second floor of the home and the processor may not be able to locate the robot within the stored map. The robot may begin to perform work and the processor may build a new map. Or in another example, a user may lend the robot to another person. In such a case, the processor may not be able to locate the robot within the stored map as it is located within a different home than that of the user. Thus, the robot begins to perform work. In some cases, the processor of the robot may begin building a new map. In some embodiments, a new map may be stored as a separate entry when the difference between a stored map and the new map exceeds a certain threshold. In some embodiments, a cold-start operation includes fetching N maps from the cloud and localizing (or trying to localize) the robot using each of the N maps. In some embodiments, such operations are slow, particularly when performed serially. In some embodiments, the processor uses a localization regain method to localize the robot when cleaning starts. In some embodiments, the localization regain method may be modified to be a global localization regain method. In some embodiments, fast and robust localization regain method may be completed within seconds. In some embodiments, the processor loads a next map after regaining localization fails on a current map and repeats the process of attempting to regain localization. In some embodiments, the saved map may include a bare minimum amount of useful information and may have a lowest acceptable resolution. This may reduce the footprint of the map and may thus reduce computational, size (in terms of latency), and financial (e.g., for cloud services) costs.

In some embodiments, the processor may ignore at least some elements (e.g., confinement line) added to the map by a user when regaining localization in a new work session. In some embodiments, the processor may not consider all features within the environment to reduce confusion with the walls within the environment while regaining localization.

In some embodiments, the processor may use odometry, IMU, and optical tracking sensor (OTS) information to update an EKF. In some embodiments, arbitrators may be used. For example, a multi-room arbitrator state. In some embodiments, the robot may initialize the hardware and then other software. In some embodiments, a default parameter may be provided as a starting value when initialization occurs. In some embodiments, the default value may be replaced by readings from a sensor. In some embodiments, the robot may make an initial circulation of the environment. In some embodiments, the circulation may be 180 degrees, 360 degrees, or a different amount. In some embodiments, odometer readings may be scaled to the OTS readings. In some embodiments, an odometer/OTS corrector may create an adjusted value as its output. In some embodiments, heading rotation offset may be calculated.

Further details of localization methods that may be used are described in U.S. patent application Ser. Nos. 16/297,508, 15/955,480, 15/425,130, 15/955,344, 16/509,099, the entire contents of which are hereby incorporated by reference.

In some embodiments, SLAM methods described herein may be used for recreating a virtual spatial reality. In some embodiments, a 360 degree capture of the environment may be used to create a virtual spatial reality of the environment within which a user may move. In some embodiments, a virtual spatial reality may be used for games. For example, a virtual or augmented spatial reality of a room moves at a walking speed of a user experiencing the virtual spatial reality. In some embodiments, the walking speed of the user may be determined using a pedometer worn by the user. In some embodiments, a spatial virtual reality may be created and later implemented in a game wherein the spatial virtual reality moves based on a displacement of a user measured using a SLAM device worn by the user. In some instances, a SLAM device may be more accurate than a pedometer as pedometer errors are adjusted with scans. In some current virtual reality games a user may need to use an additional component, such as a chair synchronized with the game (e.g., moving to imitate the feeling of riding a roller coaster), to have a more realistic experience. In the spatial virtual reality described herein, a user may control where they go within the virtual spatial reality (e.g., left, right, up, down, remain still). In some embodiments, the movement of the user measured using a SLAM device worn by the user may determine the response of a virtual spatial reality video seen by the user. For example, if a user runs, a video of the virtual spatial reality may play faster. If the user turns right, the video of the virtual spatial reality shows the areas to the right of the user.

In some embodiments, the processor of the robot may identify areas that may be easily covered by the robot (e.g., areas without or with minimal obstacles). For example, FIG. 80 illustrates an area 8000 that may be easily covered by the robot 8001 by following along boustrophedon path 8002. In some embodiments, the path of the robot may be a boustrophedon path. In some embodiments, boustrophedon paths may be slightly modified to allow for a more pleasant path planning structure. For example, FIGS. 81A and 81B illustrates an example of a boustrophedon path 8100. Assuming the robot travels in direction 8101, the robot moves in a straight line, and at the end of the straight line (denoted by circles 8103) follows along a curved path to rotate 180 degrees and move along a straight line in the opposite direction. In some instances, the robot follows along a smoother path plan to rotate 180 degrees, denoted by circle 8104. In some embodiments, the processor of the robot increases the speed of the robot as it approaches the end of a straight right line prior to rotating as the processor is highly certain there are no obstacles to overcome in such a region. In some embodiments, the path of the robot includes driving along a rectangular path (e.g., by wall following) and cleaning within the rectangle. In some embodiments, the robot may begin by wall following and after the processor identifies two or three perimeters, for example, the processor may then actuate the robot to cover the area inside the perimeters before repeating the process.

In some embodiments, the robot may drive along the perimeter or surface of an object with an angle such as that illustrated in FIG. 82A with object 8200. In some embodiments, the robot may be driving with a certain speed and as the robot drives around the sharp angle the distance of the robot from the object may increase, as illustrated in FIG. 82B with object 8201 and path 8202 of the robot. In some embodiments, the processor may readjust the distance of the robot from the object. In some embodiments, the robot may drive along the perimeter or surface of an object with an angle such as that illustrated in FIG. 82C with object 8203 and path 8204 of the robot. In some embodiments, the processor of the robot may smoothen the path of the robot, as illustrated in FIG. 82D with object 8203 and smoothened path 8205 of the robot. In some cases, such as in FIG. 82E, the robot may drive along a path 8206 adjacent to the perimeter or surface of the object 8203 and suddenly miss the perimeter or surface of the object at a point 8207 where the direction of the perimeter or surface changes. In such cases, the robot may have momentum and a sudden correction may not be desired. Smoothening the path may avoid such situations. In some embodiments, the processor may smoothen a path with systematic discrepancies between odometry (Odom) and an OTS due to momentum of the robot (e.g., when the robot stops rotating). FIGS. 83A-83C illustrate an example of an output of an EKF (Odom: ν_(x), ν_(w), timestamp; OTS: ν_(x), ν_(w), timestamp (in OTS coordinates); and IMU: timestamp) for three phases. In phase one, shown in FIG. 83A, the odometer, OTS, and IMU agree that the robot is rotating. In phase two, shown in FIG. 83B, the odometer reports 0, 0 without ramping down and with ˜150 ms delay while the OTS and IMU agree that the robot is moving. The EKF rejects the odometer. Such discrepancies may be resolved by smoothening the slowing down phase of the robot to compensate for the momentum of the robot. FIG. 83C illustrates phase three wherein the odometer, OTS, and IMU report low (or no) movement of the robot.

In some embodiments, a TSSP or LED IR event may be detected as the robot traverses along a path within the environment. For example, a TSSP event may be detected when an obstacle is observed on a right side of the robot and may be passed to a control module as (L: 0 R: 1). In some embodiments, the processor may add newly discovered obstacles (e.g., static and dynamic obstacles) and/or cliffs to the map when unexpectedly (or expectedly) encountered during coverage. In some embodiments, the processor may adjust the path of the robot upon detecting an obstacle.

In some embodiments, a path executor may command the robot to follow a straight or curved path for a consecutive number of seconds. In some cases, the path executor may exit for various reasons, such as having reached the goal. In some embodiments, a curve to point path may be planned to drive the robot from a current location to a desired location while completing a larger path. In some embodiments, traveling along a planned path may be infeasible. For example, traversing a next planned curved or straight path by the robot may be infeasible. In some embodiments, the processor may use various feasibility conditions to determine if a path is traversable by the robot. In some embodiments, feasibility may be determined for the particular dimensions of the robot.

In some embodiments, the processor of the robot may use the map (e.g., locations of rooms, layout of areas, etc.) to determine efficient coverage of the environment. In some embodiments, the processor may choose to operate in closer rooms first as traveling to distant rooms may be burdensome and/or may require more time and battery life. For example, the processor of a robot may choose to clean a first bedroom of a home upon determining that there is a high probability of a dynamic obstacle within the home office and a very low likelihood of a dynamic obstacle within the first bedroom. However, in a map layout of the home, the first bedroom is several rooms away from the robot. Therefore, in the interest of operating at peak efficiency, the processor may choose to clean the hallway, a washroom, and a second bedroom, each on the way to the first bedroom. In an alternative scenario, the processor may determine that the hallway and the washroom have a low probability of a dynamic obstacle and that second bedroom has a higher probability of a dynamic obstacle and may therefore choose to clean the hallway and the washroom before checking if there is a dynamic obstacle within the second bedroom. Alternatively, the processor may skip the second bedroom after cleaning the hallway and washroom, and after cleaning the first bedroom, may check if second bedroom should be cleaned.

In some embodiments, the processor may use obstacle sensor readings to help in determining coverage of an environment. In some embodiments, obstacles may be discovered using data of a depth sensor as the depth sensor approaches the obstacles from various points of view and distances. In some embodiments, the robot covers areas with low obstacle density first and then performs a robust coverage. In some embodiments, a robust coverage includes covering areas with high obstacle density. In some embodiments, the robot may perform a robust coverage before performing a low density coverage. In some embodiments, the robot covers open areas (or areas with low obstacle density) one by one, executes a wall follow, covers areas with high obstacle density, and then navigates back to its charging station. In some embodiments, the processor of the robot may notify a user (e.g., via an application of a communication device) if an area is too complex for coverage and may suggest the user skip that area or manually operate navigation of the robot (e.g., manually drive an autonomous vehicle or manually operate a robotic surface cleaner using a remote).

In some embodiments, the processor may use an observed level of activity within areas of the environment when determining coverage. For example, a processor of a surface cleaning robot may prioritize consistent cleaning of a living room when a high level of human activity is observed within the living room as it is more likely to become dirty as compared to an area with lower human activity. In some embodiments, the processor may use an amount of debris historically collected or observed within various locations of the environment when determining a prioritization of rooms for cleaning. In some embodiments, the amount of debris collected or observed within the environment may be catalogued and made available to a user. In some embodiments, the user may select areas for cleaning based on debris data provided to the user.

In some embodiments, the processor may use a traversability algorithm to determine different areas that may be safely traversed by the robot, from which a coverage plan of the robot may be taken. In some embodiments, the traversability algorithm obtains a portion of data from the map corresponding to areas around the robot at a particular moment in time. In some embodiments, the multidimensional and dynamic map includes a global and local map of the environment, constantly changing in real-time as new data is sensed. In some embodiments, the global map includes all global sensor data (e.g., LIDAR data, depth sensor data) and the local map includes all local sensor data (e.g., obstacle data, cliff data, debris data, previous stalls, floor transition data, floor type data, etc.). In some embodiments, the traversability algorithm may determine a best two-dimensional coverage area based on the portion of data taken from the map. The size, shape, orientation, position, etc. of the two-dimensional coverage area may change at each interval depending on the portion of data taken from the map. In some embodiments, the two-dimensional coverage area may be a rectangle or another shape. In some embodiments, a rectangular coverage area is chosen such that it aligns with the walls of the environment. FIG. 84 illustrates an example of a coverage area 8400 for robot 8401 within environment 8402. In some embodiments, coverage areas chosen may be of different shapes and sizes. For example, FIG. 85 illustrates a coverage area 8500 for robot 8401 with a different shape within environment 8402.

In some embodiments, the traversability algorithm employs simulated annealing technique to evaluate possible two-dimensional coverage areas (e.g., different positions, orientations, shapes, sizes, etc. of two-dimensional coverage areas) and choose a best two-dimensional coverage area (e.g., the two-dimensional coverage area that allows for easiest coverage by the robot). In embodiments, simulated annealing may model the process of heating a system and slowly cooling the system down in a controlled manner. When a system is heated during annealing, the heat may provide a randomness to each component of energy of each molecule. As a result, each component of energy of a molecule may temporarily assume a value that is energetically unfavorable and the full system may explore configurations that have high energy. When the temperature of the system is gradually lowered the entropy of the system may be gradually reduced as molecules become more organized and take on a low-energy arrangement. Also, as the temperature is lowered, the system may have an increased probability of finding an optimum configuration. Eventually the entropy of the system may move towards zero wherein the randomness of the molecules is minimized and an optimum configuration may be found.

In simulated annealing, a goal may be to bring the system from an initial state to a state with minimum possible energy. Ultimately, the simulation of annealing, may be used to find an approximation of a global minimum for a function with many variables, wherein the function may be analogous to the internal energy of the system in a particular state. Annealing may be effective because even at moderately high temperatures, the system slightly favors regions in the configuration space that are overall lower in energy, and hence are more likely to contain the global minimum. At each time step of the annealing simulation, a neighboring state of a current state may be selected and the processor may probabilistically determine to move to the neighboring state or to stay at the current state. Eventually, the simulated annealing algorithm moves towards states with lower energy and the annealing simulation may be complete once an adequate state (or energy) is reached.

In some embodiments, the traversability algorithm classifies the map into areas that the robot may navigate to, traverse, and perform work. In some embodiments, the traversability algorithm may use stochastic or other methods for to classify an X, Y, Z, K, L, etc. location of the map into a class of a traversability map. For lower dimension maps, the processor of the robot may use analytic methods, such as derivatives and solving equations, in finding optimal model parameters. However, as models become more complicated, the processor of the robot may use local derivatives and gradient methods, such as in neural networks and maximum likelihood methods. In some embodiments, there may be multiple maxima, therefore the processor may perform multiple searches from different starting conditions. Generally, the confidence of a decision increases as the number of searches or simulations increases. In some embodiments, the processor may use naïve approaches. In some embodiments, the processor may bias a search towards regions within which the solution is expected to fall and may implement a level of randomness to find a best or near to best parameter. In some embodiments, the processor may use Boltzmann learning or genetic algorithms, independently or in combination.

In some embodiments, the processor may model the system as a network of nodes with bi-directional links. In some embodiments, bi-directional links may have corresponding weights w_(ij)=w_(ji). In some embodiments, the processor may model the system as a collection of cells wherein a value assigned to a cell indicates traversability to a particular adjacent cell. In some embodiments, values indicating traversability from the cell to each adjacent cell may be provided. The value indicating traversability may be binary or may be a weight indicating a level (or probability) of traversability. In some embodiments, the processor may model each node as a magnet, the network of N nodes modeled as N magnets and each magnet having a north pole and a south pole. In some embodiments, the weights wij are functions of the separation between the magnets. In some embodiments, a magnet i pointing upwards, in the same direction as the magnetic field, contributes a small positive energy to the total system and has a state value s_(i)=+1 and a magnet i pointing downwards contributes a small negative energy to the total system and has a state value s_(i)=−1. Therefore, the total energy of the collection of N magnets is proportional to the total number of magnets pointing upwards. The probability of the system having a particular total energy may be related to the number of configurations of the system that result in the same positive energy or the same number of magnets pointing upwards. The highest level of energy has only a single possible configuration, i.e.,

$\begin{pmatrix} N \\ N_{i} \end{pmatrix} = {\begin{pmatrix} N \\ 0 \end{pmatrix} = 1}$ wherein N_(i) is the number of magnets pointing downwards. In the second highest level of energy, a single magnet is pointing downwards. Any single magnet of the collection of magnets may be the one magnet pointing downwards. In the third highest level of energy, two magnets are pointing downwards. The probability of the system having the third highest level of energy is related to the number of system configurations having only two magnets pointing downwards, i.e.

$\begin{pmatrix} N \\ 2 \end{pmatrix} = {\frac{N\left( {N - 1} \right)}{2}.}$ The number of possible configurations declines exponentially as the number of magnets pointing downwards increases, as does the Boltzmann factor.

In some embodiments, the system modeled has a large number of magnets N, each having a state s_(i) for i=1, . . . , N. In some embodiments, the value of each state may be one of two Boolean values, such as ±1 as described above. In some embodiments, the processor determines the values of the states s_(i) that minimize a cost or energy function. In some embodiments, the energy function may be

${E = {{- \frac{1}{2}}{\sum}_{i,{j = 1}}^{N}w_{ij}s_{i}s_{j}}},$ wherein the weight w_(ij) may be positive or negative. In some embodiments, the processor eliminates self-feedback terms (i.e., w_(ii)=0) as non-zero values for w_(ii) add a constant to the function E which has no significance, independent of s_(i). In some embodiments, the processor determines an interaction energy

$E_{ij} = {{- \frac{1}{2}}w_{ij}s_{i}s_{j}}$ between neighboring magnets based on their states, separation, and other physical properties. In some embodiments, the processor determines an energy of an entire system by the integral of all the energies that interact within the system. In some embodiments, the processor determines the configuration of the states of the magnets that has the lowest level of energy and thus the most stable configuration. In some embodiments, the space has 2^(N) possible configurations. Given the high number of possible configuration, determining the configuration with the lowest level of energy may be computationally expensive. In some cases, employing a greedy algorithm may result in becoming stuck in a local energy minima or never converging. In some embodiments, the processor determines a probability

${P(\gamma)} = \frac{e^{{- E_{\gamma}}/T}}{Z(T)}$ of the system having a (discrete) configuration γ with energy Eγ at temperature T, wherein Z(T) is a normalization constant. The numerator of the probability P(γ) is the Boltzmann factor and the denominator Z(T) is given by the partition function Σe^(−E) ^(γ) ^(/T). The sum of the Boltzmann constant for all possible configurations Z(T)=Σe^(−E) ^(γ) ^(/T) guarantees the equation represents a true probability. Given the large number of possible configurations, 2^(N), Z(T) may only be determined for simple cases.

In some embodiments, the processor may fit a boustrophedon path to the two-dimensional coverage area chosen by shortening or lengthening the longer segments of the boustrophedon path that cross from one side of the coverage area to the other and by adding or removing some of the longer segments of the boustrophedon path while maintaining a same distance between the longer segments regardless of the two-dimensional coverage area chosen (e.g., or by adjusting parameters defining the boustrophedon path). Since the map is dynamic and constantly changing based on real-time observations, the two-dimensional coverage area is polymorphic and constantly changing as well (e.g., shape, size, position, orientation, etc.). Hence, the boustrophedon movement path is polymorphic and constantly changing as well (e.g., orientation, segment length, number of segments, etc.). In some embodiments, a coverage area may be chosen and a boustrophedon path may be fitted thereto in real-time based on real-time observations. As the robot executes the path plan (i.e., coverage of the coverage area via boustrophedon path) and discovers additional areas, the path plan may be polymorphized wherein the processor overrides the initial path plan with an adjusted path plan (e.g., adjusted coverage area and boustrophedon path). For example, FIG. 86 illustrates a path plan that was polymorphized three times. Initially, a small rectangle 8600 was chosen as the coverage area and a boustrophedon path 8601 was fitted to the small rectangle 8600. However, after obtaining more information, an override of the initial path plan was executed and thus polymorphized, resulting in the coverage area 8600 increasing in size to rectangle 8602. Hence, the second boustrophedon row 8603 is adjusted to fit larger coverage area 8602. This occurs another time, resulting in larger coverage area 8604 and larger boustrophedon path 8605 executed by robot 8606.

In some embodiments, the processor may use a feasibility function, a probabilistic method, to evaluate possible coverage areas to determine areas in which the robot may have a reasonable chance of encountering a successful traverse (or climb). In some embodiments, the feasibility function may be determined for the particular wheel dimensions and other mechanical characteristics of the robot. In some embodiments, the mechanical characteristics may be configurable. For example, FIG. 87 illustrates a path 8700 traversable by the robot as all the values of z (indicative of height) within the cells are five and the particular wheel dimensions and mechanical characteristics of the robot allow the robot to overcome areas with a z value of five. FIG. 88 illustrates another example of a traversable path 8800. In this case, the path is traversable as the values of z increase gradually, making the area climbable (or traversable) by the robot. FIG. 89 illustrates an example of a path 8900 that is not traversable by the robot because of the sudden increase in the value of z between two adjacent cells. FIG. 90 illustrates an adjustment to the path 8900 illustrated in FIG. 89 that is traversable by the robot. FIG. 91 illustrates examples of areas traversable by the robot 9100 because of gradual incline/decline or the size of the wheel 9101 of the robot 9100 relative to the area in which a change in height is observed. FIG. 92 illustrates examples of areas that are not traversable by the robot 9100 because of gradual incline/decline or the size of the wheel 9101 of the robot 9100 relative to the area in which a change in height is observed. In some embodiments, the z value of each cell may be positive or negative and represent a distance relative to a ground zero plane.

In some embodiments, an algorithm may be trained in advance through a neural network to identify areas with high chances of being traversable and areas with low chances of being traversable. In some embodiments, the processor may use a real-time classifier to identify the chance of traversing an area. In some embodiments, bias and variance may be adjusted to allow the processor of the robot to learn on the go or use previous teachings. In some embodiments, the machine learned algorithm may be used to learn from mistakes and enhance the information used in path planning for a current and future work sessions. In some embodiments, traversable areas may initially be determined in a training work sessions and a path plan may be devised at the end of training and followed in following work sessions. In some embodiments, traversable areas may be adjusted and built upon in consecutive work sessions. In some embodiments, bias and variance may be adjusted to determine how reliant the algorithm is on the training and how reliant the algorithm is on new findings. A low bias-variance ratio value may be used to determine no reliance on the newly learned data, however, this may lead to the loss of some valuable information learned in real time. A high bias-variance ration may indicate total reliance on the new data, however, this may lead to new learning corrupting the initial classification training. In some embodiments, a monitoring algorithm constantly receiving data from the cloud and/or from robots in a fleet (e.g., real-time experiences) may dynamically determine a bias-variance ratio.

In some embodiments, data from multiple classes of sensors may be used in determining traversability of an area. In some embodiments, an image captured by a camera may be used in determining traversability of an area. In some embodiments, a single camera that may use different filters and illuminations in different timestamps may be used. For example, one image may be captured without active illumination and may use atmospheric illumination. This image may be used to provide some observations of the surroundings. Many algorithms may be used to extract usable information from an image captured of the surroundings. In a next timestamp, the image of the environment captured may be illuminated. In some embodiments, the processor may use a difference between the two images to extract additional information. In some embodiments, structured illumination may be used and the processor may extract depth information using different methods. In some embodiments, the processor may use an image captured (e.g., with or without illumination or with structured light illumination) at a first timestamp as a priori in a Bayesian system. Any of the above mentioned methods may be used as a posterior. In some embodiments, the processor may extract a driving surface plane from an image without illumination. In some embodiments, the driving surface plane may be highly weighted in the determination of the traversability of an area. In some embodiments, a flat driving surface may appear as a uniform color in captured images. In some embodiments, obstacles, cliffs, holes, walls, etc. may appear as different textures in captured images. In some embodiments, the processor may distinguish the driving surface from other objects, such as walls, ceilings, and other flat and smooth surfaces, given the expected angle of the driving surface with respect to the camera. Similarly, ceilings and walls may be distinguished from other surfaces as well. In some embodiments, the processor may use depth information to confirm information or provide further granular information once a surface is distinguished. In some embodiments, this may be done by illuminating the FOV of the camera with a set of preset light emitting devices. In some embodiments, the set of preset light emitting devices may include a single source of light turned into a pattern (e.g., a line light emitter with an optical device, such as a lens), a line created with multiple sources of lights (such as LEDs) organized in an arrangement of dots that appear as a line, or a single source of light manipulated optically with one or more lenses and an obstruction to create a series of points in a line, in a grid, or any desired pattern.

In some embodiments, data from an IMU (or gyroscope) may also be used to determine traversability of an area. In some embodiments, an IMU may be used to measure the steepness of a ramp and a timer synchronized with the IMU may measure the duration of the steepness measured. Based on this data, a classifier may determine the presence of a ramp (or a bump, a cliff, etc. in other cases). Other classes of sensors that may be used in determining traversability of an area may include depth sensors, range finders, or distance measurement sensors. In one example, one measurement indicating a negative height (e.g., cliff) may slightly decreases the probability of traversability of an area. However, after a single measurement, the probability of traversability may not be low enough for the processor to mark the coverage area as untraversable. A second sensor may measure a small negative height for the same area that may increase the probability of traversability of the area and the area may be marked as traversable. However, another sensor reading indicating a high negative height at the same area decreases the probability of traversability of the area. When a probability of traversability of an area reaches below a threshold the area may be marked as a high risk coverage area. In some embodiments, there may be different thresholds for indicating different risk levels. In some embodiments, a value may be assigned to coverage areas to indicate a risk severity.

FIG. 93A illustrates a sensor of the robot 9300 measuring a first height relative to a driving plane 9301 of the robot 9300. FIG. 93B illustrates a low risk level at this instant due to only a single measurement indicating a high height. The probability of traversability decreases slightly and the area is marked as higher risk but not enough for it to be marked as an untravesable area. FIG. 93C illustrates the sensor of the robot 9300 measuring a second height relative to the driving plane 9301 of the robot 9300. FIG. 93D illustrates a reduction in the risk level at this instant due to the second measurement indicating a small or no height difference. In some embodiments, the risk level may reduce gradually. In some embodiments, a dampening value may be used to reduce the risk gradually. FIG. 94A illustrates sensors of robot 9400 taking a first 9401 and second 9402 measurement to driving plane 9403. FIG. 94B illustrates an increase in the risk level to a medium risk level after taking the second measurement as both measurements indicate a high height. Depending on the physical characteristics of the robot and parameters set, the area may be untraversable by the robot. FIG. 95A illustrates sensors of robot 9500 taking a first 9501 and second 9502 measurement to driving plane 9503. FIG. 95B illustrates an increase in the risk level to a high risk level after taking the second measurement as both measurements indicate a very high height. The area may be untraversable by the robot due to the high risk level.

In some embodiments, in addition to raw distance information, a second derivative of a sequence of distance measurements may be used to monitor the rate of change in the z values (i.e., height) of connected cells in a Cartesian plane. In some embodiments, second and third derivatives indicating a sudden change in height may increase the risk level of an area (in terms of traversability). FIG. 96A illustrates a Cartesian plane, with each cell having a coordinate with value (x, y, T), wherein T is indicative of traversability. FIG. 96B illustrates a visual representation of a traversability map, wherein different shades of color indicate the traversability of the cell by the robot. In this example, cells with darker shades of color correspond with a lower probability of traversability by the robot. In some embodiments, traversability T may be a numerical value or a label (e.g., low, medium, high) based on real-time and prior measurements. For example, an area in which an entanglement with a brush of the robot previously occurred or an area in which a liquid was previously detected or an area in which the robot was previously stuck or an area in which a side brush of the robot was previously entangled with tassels of a rug may increase the risk level and reduce the probability of traversability of the area. In another example, the presence of a hidden obstacle or a sudden discovery of a dynamic obstacle (e.g., a person walking) in an area may also increase the risk level and reduce the probability of traversability of the area. In one example, a sudden change in a type of driving surface in an area or a sudden discovery of a cliff in an area may impact the probability of traversability of the area. In some embodiments, traversability may be determined for each path from a cell to each of its neighboring cells. In some embodiments, it may be possible for the robot to traverse from a current cell to more than one neighboring cell. In some embodiments, a probability of traversability from a cell to each one or a portion of its neighboring cells may be determined. In some embodiments, the processor of the robot chooses to actuate the robot to move from a current cell to a neighboring cell based on the highest probability of traversability from the current cell to each one of its neighboring cells.

In some embodiments, the processor of the robot (or the path planner, for example) may instruct the robot to return to a center of a first two-dimensional coverage area when the robot reaches an end point in a current path plan before driving to a center of a next path plan. FIG. 97A illustrates the robot 9700 at an end point of one polymorphic path plan with coverage area 9701 and boustrophedon path 9702. FIG. 97B illustrates a subsequent moment wherein the processor decides a next polymorphic rectangular coverage area 9703. The dotted line 9704 indicates a suggested L-shape path back to a central point of a first polymorphic rectangular coverage area 9701 and then to a central point of the next polymorphic rectangular coverage area 9703. Because of the polymorphic nature of these path planning methods, the path may be overridden by a better path, illustrated by the solid line 9705. The path defined by the solid line 9705 may override the path defined by the dotted line 9704. The act of overriding may be a characteristic that may be defined in the realm of polymorphism. FIG. 97C illustrates a local planner 9706 (i.e., the grey rectangle) with a half-filled map. FIG. 97D illustrates that over time more readings are filled within the local map 9706. In some embodiments, local sensing may be superimposed over the global map and may create a dynamic and constantly evolving map. In some embodiments, the processor updates the global map as the global sensors provide additional information throughout operation. For example, FIG. 97E illustrates that data sensed by global sensors are integrated into the global map 9707. As the robot approaches obstacles, they may fall within the range of range sensor and the processor may gradually add the obstacles to the map.

In embodiments, the path planning methods described herein are dynamic and constantly changing. In some embodiments, the processor determines, during operation, areas within which the robot operates and operations the robot partakes in using machine learning. In some embodiments, information such as driving surface type and presence or absence of dynamic obstacles, may be used in forming decisions. In some embodiments, the processor uses data from prior work sessions in determining a navigational plan and a task plan for conducting tasks. In some embodiments, the processor may use various types of information to determine a most efficient navigational and task plan. In some embodiments, sensors of the robot collect new data while the robot executes the navigational and task plan. The processor may alter the navigational and task plan of the robot based on the new data and may store the new data for future use.

Other path planning methods that may be used are described in U.S. patent application Ser. Nos. 16/041,286, 16/422,234, 15/406,890, 15/676,888, and 14/673,633, the entire contents of which are hereby incorporated by reference. For example, in some embodiments, the processor of the robot may generate a movement path in real-time based on the observed environment. In some embodiments, a topological graph may represent the movement path and may be described with a set of vertices and edges, the vertices being linked by edges. Vertices may be represented as distinct points while edges may be lines, arcs or curves. The properties of each vertex and edge may be provided as arguments at run-time based on real-time sensory input of the environment. The topological graph may define the next actions of the robot as it follows along edges linked at vertices. While executing the movement path, in some embodiments, rewards may be assigned by the processor as the robot takes actions to transition between states and uses the net cumulative reward to evaluate a particular movement path comprised of actions and states. A state-action value function may be iteratively calculated during execution of the movement path based on the current reward and maximum future reward at the next state. One goal may be to find optimal state-action value function and optimal policy by identifying the highest valued action for each state. As different topological graphs including vertices and edges with different properties are executed over time, the number of states experienced, actions taken from each state, and transitions increase. The path devised by the processor of the robot may iteratively evolve to become more efficient by choosing transitions that result in most favorable outcomes and by avoiding situations that previously resulted in low net reward. After convergence, the evolved movement path may be determined to be more efficient than alternate paths that may be devised using real-time sensory input of the environment. In some embodiments, a MDP may be used.

In some embodiments, the processor of the robot may determine optimal (e.g., locally or globally) division and coverage of the environment by minimizing a cost function or by maximizing a reward function. In some embodiments, the overall cost function C of a zone or an environment may be calculated by the processor of the robot based on a travel and cleaning cost K and coverage L. In some embodiments, other factors may be inputs to the cost function. The processor may attempt to minimize the travel and cleaning cost K and maximize coverage L. In some embodiments, the processor may determine the travel and cleaning cost K by computing individual cost for each zone and adding the required driving cost between zones. The driving cost between zones may depend on where the robot ended coverage in one zone, and where it begins coverage in a following zone. The cleaning cost may be dependent on factors such as the path of the robot, coverage time, etc. In some embodiments, the processor may determine the coverage based on the square meters of area covered (or otherwise area operated on) by the robot. In some embodiments, the processor of the robot may minimize the total cost function by modifying zones of the environment by, for example, removing, adding, shrinking, expanding, moving and switching the order of coverage of zones. For example, in some embodiments the processor may restrict zones to having rectangular shape, allow the robot to enter or leave a zone at any surface point and permit overlap between rectangular zones to determine optimal zones of an environment. In some embodiments, the processor may include or exclude additional conditions. In some embodiments, the cost accounts for additional features other than or in addition to travel and operating cost and coverage. Examples of features that may be inputs to the cost function may include, coverage, size, and area of the zone, zone overlap with perimeters (e.g., walls, buildings, or other areas the robot cannot travel), location of zones, overlap between zones, location of zones, and shared boundaries between zones. In some embodiments, a hierarchy may be used by the processor to prioritize importance of features (e.g., different weights may be mapped to such features in a differentiable weighted, normalized sum). For example, tier one of a hierarchy may be location of the zones such that traveling distance between sequential zones is minimized and boundaries of sequential zones are shared, tier two may be to avoid perimeters, tier three may be to avoid overlap with other zones and tier four may be to increase coverage.

In some embodiments, the processor may use various functions to further improve optimization of coverage of the environment. These functions may include, a discover function wherein a new small zone may be added to large and uncovered areas, a delete function wherein any zone with size below a certain threshold may be deleted, a step size control function wherein decay of step size in gradient descent may be controlled, a pessimism function wherein any zone with individual operating cost below a certain threshold may be deleted, and a fast grow function wherein any space adjacent to a zone that is predominantly unclaimed by any other zone may be quickly incorporated into the zone.

In some embodiments, to optimize division of zones of an environment, the processor may proceed through the following iteration for each zone of a sequence of zones, beginning with the first zone: expansion of the zone if neighbor cells are empty, movement of the robot to a point in the zone closest to the current position of the robot, addition of a new zone coinciding with the travel path of the robot from its current position to a point in the zone closest to the robot if the length of travel from its current position is significant, execution of a coverage pattern (e.g. boustrophedon) within the zone, and removal of any uncovered cells from the zone.

In some embodiments, the processor may determine optimal division of zones of an environment by modeling zones as emulsions of liquid, such as bubbles. In some embodiments, the processor may create zones of arbitrary shape but of similar size, avoid overlap of zones with static structures of the environment, and minimize surface area and travel distance between zones. In some embodiments, behaviors of emulsions of liquid, such as minimization of surface tension and surface area and expansion and contraction of the emulsion driven by an internal pressure may be used in modeling the zones of the environment. To do so, in some embodiments, the environment may be represented by a grid map and divided into zones by the processor. In some embodiments, the processor may convert the grid map into a routing graph G consisting of nodes N connected by edges E. The processor may represent a zone A using a set of nodes of the routing graph wherein A⊆N. The nodes may be connected and represent an area on the grid map. In some embodiments, the processor may assign a zone A a set of perimeters edges E wherein a perimeters edge e=(n₁, n₂) connects a node n₁ ∈ A with a node n₂ ∉ A. Thus, the set of perimeters edges clearly defines the set of perimeters nodes aA, and gives information about the nodes, which are just inside zone A as well as the nodes just outside zone A. Perimeters nodes in zone A may be denoted by ∂A^(in) and perimeters nodes outside zone A by ∂A^(out). The collection of ∂A^(in) and ∂A^(out) together are all the nodes in ∂A. In some embodiments, the processor may expand a zone A in size by adding nodes from ∂A^(out) to zone A and reduce the zone in size by removing nodes in ∂A^(in) from zone A, allowing for fluid contraction and expansion. In some embodiments, the processor may determine a numerical value to assign to each node in ∂A, wherein the value of each node indicates whether to add or remove the node from zone A.

In some embodiments, the processor may determine the best division of an environment by minimizing a cost function defined as the difference between theoretical (e.g., modeled with uncertainty) area of the environment and the actual area covered. The theoretical area of the environment may be determined by the processor using a map of the environment. The actual area covered may be determined by the processor by recorded movement of the robot using, for example, an odometer or gyroscope. In some embodiments, the processor may determine the best division of the environment by minimizing a cost function dependent on a path taken by the robot comprising the paths taken within each zone and in between zones. The processor may restrict zones to being rectangular (or having some other defined number of vertices or sides) and may restrict the robot to entering a zone at a corner and to driving a serpentine routine (or other driving routine) in either x- or y-direction such that the trajectory ends at another corner of the zone. The cost associated with a particular division of an environment and order of zone coverage may be computed as the sum of the distances of the serpentine path travelled for coverage within each zone and the sum of the distances travelled in between zones (corner to corner). To minimize cost function and improve coverage efficiency zones may be further divided, merged, reordered for coverage and entry/exit points of zones may be adjusted. In some embodiments, the processor of the robot may initiate these actions at random or may target them. In some embodiments, wherein actions are initiated at random (e.g., based on a pseudorandom value) by the processor, the processor may choose a random action such as, dividing, merging or reordering zones, and perform the action. The processor may then optimize entry/exit points for the chosen zones and order of zones. A difference between the new cost and old cost may be computed as Δ=new cost−old cost by the processor wherein an action resulting in a difference <0 is accepted while a difference >0 is accepted with probability exp(−Δ/T) wherein T is a scaling constant. Since cost, in some embodiments, strongly depends on randomly determined actions the processor of the robot, embodiments may evolve ten different instances and after a specified number of iterations may discard a percentage of the worst instances.

In some embodiments, the processor may actuate the robot to execute the best or a number of the best instances and calculate actual cost. In embodiments, wherein actions are targeted, the processor may find the greatest cost contributor, such as the largest travel cost, and initiate a targeted action to reduce the greatest cost contributor. In embodiments, random and targeted action approaches to minimizing the cost function may be applied to environments comprising multiple rooms by the processor of the robot. In embodiments, the processor may directly actuate the robot to execute coverage for a specific division of the environment and order of zone coverage without first evaluating different possible divisions and orders of zone coverage by simulation. In embodiments, the processor may determine the best division of the environment by minimizing a cost function comprising some measure of the theoretical area of the environment, the actual area covered, and the path taken by the robot within each zone and in between zones.

In some embodiments, the processor may determine a reward and assigns it to a policy based on performance of coverage of the environment by the robot. In some embodiments, the policy may include the zones created, the order in which they were covered, and the coverage path (i.e., it may include data describing these things). In some embodiments, the policy may include a collection of states and actions experienced by the robot during coverage of the environment as a result of the zones created, the order in which they were covered, and coverage path. In some embodiments, the reward may be based on actual coverage, repeat coverage, total coverage time, travel distance between zones, etc. In some embodiments, the process may be iteratively repeated to determine the policy that maximizes the reward. In some embodiments, the processor determines the policy that maximizes the reward using a MDP as described above. In some embodiments, a processor of a robot may evaluate different divisions of an environment while offline. Examples of methods for dividing an environment into zones for coverage are described in U.S. patent application Ser. Nos. 14/817,952, 15/619,449, 16/198,393, 14/673,633, and 15/676,888, the entire contents of which are hereby incorporated by reference.

The Bayesian or probabilistic methods described herein may provide several practical advantages. For instance, a robot that functions behaviorally by reacting to everything sensed by the sensors of the robot may result in the robot reacting to many false positive observations. For example, a sensor of the robot may sense the presence of a person quickly walking past the robot and the processor may instruct the robot to immediately stop even though it may not be necessary as the presence of the person is short and momentary. Further, the processor may falsely mark this location as a untraversable area. In another example, brushes and scrubbers may lead to false positive sensor observations due to the occlusion of the sensor positioned on an underside of the robot and adjacent to a brush coupled to the underside of the robot. In some cases, compromises may be made in the shape of the brushes. In some cases, brushes are required to include gaps between sets of bristles such that there are time sequences where sensors positioned on the underside of the robot are not occluded. With a probabilistic method, a single occlusion of a sensor may not amount to a false positive.

In some embodiments, the probabilistic methods described may employ Bayesian methods wherein probability may represent a degree of belief in an event. In some embodiments, the degree of belief may be based on prior knowledge of the event or on assumptions about the event. In some embodiments, Bayes' theorem may be used to update probabilities after obtaining new data. Bayes' theorem may describe the conditional probability of an event based on data as well as prior information or beliefs about the event or conditions related to the event. In some embodiments, the processor may determine the conditional probability

${P\left( A \middle| B \right)} = \frac{{P\left( B \middle| A \right)}{P(A)}}{P(B)}$ of an event A given that B is true, wherein P(B)≠0. In Bayesian statistics, A may represent a proposition and B may represent new data or prior information. P(A), the prior probability of A, may be taken the probability of A being true prior to considering B. P(B|A), the likelihood function, may be taken as the probability of the information B being true given that A is true. P(A|B), the posterior probability, may be taken as the probability of the proposition A being true after taking information B into account. In embodiments, Bayes' theorem may update prior probability P(A) after considering information B. In some embodiments, the processor may determine the probability of the evidence P(B)=Σ_(i)P(B|A_(i))P(A_(i)) using the law of total probability, wherein {A₁, A₂, . . . , A_(n)} is the set of all possible outcomes. In some embodiments, P(B) may be difficult to determine as it may involve determining sums and integrals that may be time consuming and computationally expensive. Therefore, in some embodiments, the processor may determine the posterior probability as P(A|B)∝P(B|A)P(A). In some embodiments, the processor may approximate the posterior probability without, computing P(B) using methods such as Markov Chain Monte Carlo or variational Bayesian methods.

In some embodiments, the processor may use Bayesian inference wherein uncertainty in inferences may be quantified using probability. For instance, in a Bayesian approach, an action may be executed based on an inference for which there is a prior and a posterior. For example, a first reading from a sensor of a robot indicating an obstacle or a untraversable area may be considered a priori information. The processor of the robot may not instruct the robot to execute an action solely based on a priori information. However, when a second observation occurs, the inference of the second observation may confirm a hypothesis based on the a priori information and the processor may then instruct the robot to execute an action. In some embodiments, statistical models that specify a set of statistical assumptions and processes that represent how the sample data is generated may be used. For example, for a situation modeled with a Bernoulli distribution, only two possibilities may be modeled. In Bayesian inference, probabilities may be assigned to model parameters. In some embodiments, the processor may use Bayes' theorem to update the probabilities after more information is obtained. Statistical models employing Bayesian statistics require that prior distributions for any unknown parameters are known. In some cases, parameters of prior distributions may have prior distributions, resulting in Bayesian hierarchical modeling, or may be interrelated, resulting in Bayesian networks.

In employing the Bayesian methods described herein, a false positive sensor reading does not cause harm in functionality of the robot as the processor uses an initial sensor reading to only form a prior belief. In some embodiments, the processor may require a second or third observation to form a conclusion and influence of prior belief. If a second observation does not occur within a timely manner (or after a number of counts) the second observation may not be considered a posterior and may not influence a prior belief. In some embodiments, other statistical interpretations may be used. For example, the processor may use a frequentist interpretation wherein a certain frequency of an observation may be required to form a belief. In some embodiments, other simpler implementations for formulating beliefs may be used. In some embodiments, a probability may be associated with each instance of an observation. For example, each observation may count as a 50% probability of the observation being true. In this implementation, a probability of more than 50% may be required for the robot to take action.

In some embodiments, the processor converts Partial Differential Equations (PDEs) to conditional expectations based on Feynman-Kac theorem. For example, for a PDE

${{{\frac{\partial u}{\partial t}\left( {x,t} \right)} + {{\mu\left( {x,t} \right)}\frac{\partial u}{\partial x}\left( {x,t} \right)} + {\frac{1}{2}{\sigma^{2}\left( {x,t} \right)}\frac{\partial^{2}u}{\partial x^{2}}\left( {x,t} \right)} - {{V\left( {x,t} \right)}{u\left( {x,t} \right)}} + {f\left( {x,t} \right)}} = 0},$ for all x ∈

and t ∈ [0, T], and subject to terminal condition u(x, t)=ψ(x), wherein μ, σ, ψ, V, ƒ are known functions, T is a parameter, and u:

×[0, T]→

is the unknown, the Feyman-Kac formula provides a solution that may be written as a conditional expectation

u(x, t) = E^(Q)[∫_( t)^( T)e^(−∫_( t)^( r)V(X_(τ), τ)dτ)f(X_(r), r)dr + e^(−∫_( t)^( T)V(X_(τ), τ)dτ)ψ(X_(T))|X_(t) = x] under a probability measure Q such that X is an I to process driven by dX=μ(x, t)dt+σ(x, t)dW^(Q), wherein W^(Q) (t) is a Weiner process or Brownian motion under Q and initial condition X(t)=x. In some embodiments, the processor may use mean field interpretation of Feynman-Kac models or Diffusion Monte Carlo methods.

In some embodiments, the processor may use a mean field selection process or other branching or evolutionary algorithms in modeling mutation or selection transitions to predict the transition of the robot from one state to the next. In some embodiments, during a mutation transition, walkers evolve randomly and independently in a landscape. Each walker may be seen as a simulation of a possible trajectory of a robot. In some embodiments, the processor may use quantum teleportation or population reconfiguration to address a common problem of weight disparity leading to weight collapse. In some embodiments, the processor may control extinction or absorption probabilities of some Markov processes. In some embodiments, the processor may use a fitness function. In some embodiments, the processor may use different mechanisms to avoid extinction before weights become too uneven. In some embodiments, the processor may use adaptive resampling criteria, including variance of the weights and relative entropy with respect to a uniform distribution. In some embodiments, the processor may use spatial branching processes combined with competitive selection.

In some embodiments, the processor may use a prediction step given by the Chapman-Kolmogrov transport equation, an identity relating the joint probability distribution of different sets of coordinates on a stochastic process. For example, for a stochastic process given by an indexed collection of random variables {ƒ_(i)}, p_(i) ₁ , . . . , i_(n)(ƒ₁, . . . , ƒ_(n)) may be the joint probability density function of the values of random variables ƒ₁ to ƒ_(n). In some embodiments, the processor may use the Chapman-Kolmogrov equation given by

p_(i₁), …, i_(n − 1)(f₁, …, f_(n − 1)) = ∫_( −∞)^( ∞)p_(i₁), …, i_(n)(f₁, …, f_(n))df_(n), a marginalization over the nuisance variable. If the stochastic process is Markovian, the Chapman-Kolmogrov equation may be equivalent to an identity on transition densities wherein i₁< . . . <i_(n) for a Markov chain. Given the Markov property, p_(i) ₁ , . . . , i_(n)(ƒ₁, . . . , ƒ_(n))=p_(i) ₁ (ƒ₁)p_(i) ₂ _(:i) _(n−1) (ƒ_(n)|ƒ_(n−1)), wherein the conditional probability p_(iJj)(ƒ_(i)|ƒ_(j)) is a transition probability between the times i>j. Therefore, the Chapman-Kolmogrov equation may be given by

p_(i₃; i₁)(f₃|f₁) = ∫_( −∞)^( ∞)p_(i₃; i₂)(f₃|f₂)p_(i₂; i₁)(f₂|f₁)df₂, wherein the probability of transitioning from state one to state three may be determined by summating the probabilities of transitioning from state one to intermediate state two and intermediate state two to state three. If the probability distribution on the state space of a Markov chain is discrete and the Markov chain is homogenous, the processor may use the Chapman-Kolmogrov equation given by P(t+s)=P(t)P(s), wherein P(t) is the transition matrix of jump t, such that entry (i, j) of the matrix includes the probability of the chain transitioning from state i to j in t steps. To determine the transition matrix of jump t the transition matrix of jump one may be raised to the power of t, P(t)=P^(t). In some instances, the differential form of the Chapman-Kolmogrov equation may be known as the master equation.

In some embodiments, the processor may use a subset simulation method. In some embodiments, the processor may assign a small probability to slightly failed or slightly diverted scenarios. In some embodiments, the processor of the robot may monitor a small failure probability over a series of events and introduce new possible failures and prune recovered failures. For example, a wheel intended to rotate at a certain speed for 20 ms may be expected to move the robot by a certain amount. However, if the wheel is on carpet, grass, or hard surface, the amount of movement of the robot resulting from the wheel rotating at a certain speed for 20 ms may not be the same. In some embodiments subset simulation methods may be used to achieve high reliability systems. In some embodiments, the processor may adaptively generate samples conditional on failure instances to slowly populate ranges from the frequent to more occasional event region.

In some embodiments, the processor may use a complementary cumulative distribution function (CCDF) of the quantity of interest governing the failure in question to cover the high and low probability regions. In some embodiments, the processor may use stochastic search algorithms to propagate a population of feasible candidate solutions using mutation and selection mechanisms with introduction of routine failures and recoveries.

In multi-agent interacting systems, the processor may monitor the collective behavior of complex systems with interacting individuals. In some embodiments, the processor may monitor a continuum model of agents with multiple players over multiple dimensions. In some embodiments, the above methods may also be used for investigating the cause, the exact time of occurrence, and consequence of failure.

In some embodiments, dynamic obstacles and floor type may be detected by the processor during operation of the robot. As the robot operates within the environment, sensors arranged on the robot may collect information such as a type of driving surface. In some instances, the type of driving surface may be important, such as in the case of a surface cleaning robot. For example, information indicating that a room has a thick pile rug and wood flooring may be important for the operation of a surface cleaning robot as the presence of the two different driving surfaces may require the robot to adjust settings when transitioning from operating on the thick pile rug, with higher elevation, to the wood flooring with lower elevation, or vice versa. Settings may include cleaning type (e.g., vacuuming, mopping, steam cleaning, UV sterilization, etc.) and settings of robot (e.g., driving speed, elevation of the robot or components thereof from the driving surface, etc.) and components thereof (e.g., main brush motor speed, side brush motor speed, impeller motor speed, etc.). For example, the surface cleaning robot may perform vacuuming on the thick pile rug and may perform vacuuming and mopping on the wood flooring. In another example, a higher suctioning power may be used when the surface cleaning robot operates on the thick pile rug as debris may be easily lodged within the fibers of the rug and a higher suctioning power may be necessary to collect the debris from the rug. In one example, a faster main brush speed may be used when the robot operates on thick pile rug as compared to wood flooring. In another example, information indicating types of flooring within an environment may be used by the processor to operate the robot on particular flooring types indicated by a user. For instance, a user may prefer that a package delivering robot only operates on tiled surfaces to avoid tracking dirt on carpeted surfaces.

In some embodiments, a user may use an application of a communication device paired with the robot to indicate driving surface types (or other information such as floor type transitions, obstacles, etc.) within a diagram of the environment to assist the processor with detecting driving surface types. In such instances, the processor may anticipate a driving surface type at a particular location prior to encountering the driving surface at the particular location. In some embodiments, the processor may autonomously learn the location of boundaries between varying driving surface types.

In some embodiments, the processor may mark the locations of obstacles (e.g., static and dynamic) encountered in the map. In some embodiments, the map may be a dedicated obstacle map. In some embodiments, the processor may mark a location and nature of an obstacle on the map each time an obstacle is encountered. In some embodiments, the obstacles marked may be hidden. In some embodiments, the processor may assign each obstacle a decay factor and obstacles may fade away if they are not continuously observed over time. In some embodiments, the processor may mark an obstacle as a permanent obstacle if the obstacle repeatedly appears over time. This may be controlled through various parameters. In some embodiments, the processor may mark an obstacle as a dynamic obstacle if the obstacle is repeatedly not present in an expected location. Alternatively, the processor may mark a dynamic obstacle in a location wherein an unexpected obstacle is repeatedly observed at the location. In some embodiments, the processor may mark a dynamic obstacle at a location if such an obstacle appears on some occasions but not others at the location. In some embodiments, the processor may mark a dynamic obstacle at a location where an obstacle is unexpectedly observed, has disappeared, or has unexpectedly appeared. In some embodiments, the processor implements the above methods of identifying dynamic obstacles in a single work session. In some embodiments, the processor applies a dampening time to observed obstacles, wherein an observed obstacle is removed from the map or memory after some time. In some embodiments, the robot slows down and inspects a location of an observed obstacle another time.

In some embodiments, the memory of the robot may include an internal database of obstacles likely to be encountered within the environment. In some embodiments, an obstacle encountered in the environment may be identified using various sensors to capture features of the obstacle and the processor may determine the type of obstacle based on the internal database. The processor may note the increased likelihood of that type of obstacle being located in the region of the environment in which it was encountered. In some embodiments, the processor may mark the location in the map. In some embodiments, the processor may further determine if an obstacle may be overcome by the robot. If so, the robot may attempt to drive over the obstacle. If, however, the robot encounters a large obstacle, such as a chair or table, the processor may determine that it cannot overcome the obstacle and may attempt to maneuver around the obstacle and continue along its path. In some embodiments, regions wherein obstacles are consistently encountered may be classified by the processor as a high obstacle density area and may be marked in the map of the environment. In some embodiments, the processor may attempt to alter its path to avoid high obstacle density areas. In some embodiments, the processor may alert a user when an unanticipated obstacle blocking the path of the robot is encountered, particularly when the robot may not overcome the obstacle by maneuvering around or driving over the obstacle. The robot may alert the user by generating a noise, sending a message to an application of a communication device, displaying a message on a screen of the robot, illuminating lights, and the like.

In some embodiments, data from a sensor may be used to provide a L2 norm to a nearest obstacle in a field of view of the sensor. The accuracy of such observation may be limited to the resolution or application of the sensor or may be intrinsic to the atmosphere. In some embodiments, intrinsic limitations may be overcome by training the processor to provide better estimation from the observations based on a specific context of the application of the receiver. In some embodiments, a variation of gradient descent may be used to improve the observations. In some embodiments, the problem may be further processed to transform from an intensity to a classification problem wherein the processor may map a current observation to one or more of a set of possible labels. For example, an observation may be mapped to 12 millimeters and another observation may be mapped to 13 millimeters. In some embodiments, the processor may use a table look up technique to improve performance. In some embodiments, the processor may map each observation to an anticipated possible state determined through a table lookup. In some embodiments, a triangle or Gaussian methods may be used to map the state to an optimized nearest possibility instead of rounding up or down to a next state defined by a resolution. In some embodiments, a short reading may occur when the space between the receiver (or transmitter) and the intended surface (or object) to be measured is interfered with by an undesired presence. For example, when agitated particles and debris are present between a receiver and a floor, short readings may occur. In another example, presence of a person or pet walking in front of a robot may trigger short readings. Such noises may also be modelled and optimized with statistical methods. For example, presence of an undesirable object decreases as the range of a sensor decreases.

In some embodiments, a short reading may occur when the space between the receiver (or transmitter) and the intended surface (or object) to be measured is interfered with by an undesired presence. For example, when agitated particles and debris are present between a receiver and a floor, short readings may occur. In another example, presence of a person or pet walking in front of a robot may trigger short readings. Such noises may also be modelled and optimized with statistical methods. For example, presence of an undesirable object decreases as the range of a sensor decreases.

In some cases, traditional obstacle detection may be a reactive method and prone to false positives and false negatives. For example, in a traditional method, a single sensor reading may result in a reactive behavior of the robot without validation of the sensor reading which may lead to a reaction to a false positive. In some embodiments, probabilistic and Bayesian methods may be used for obstacle detection, allowing obstacle detection to be treated as a classification problem. In some embodiments, the processor may use a machined learned classification algorithm that may use all evidence available to reach a conclusion based on the likelihood of each element considered suggesting a possibility. In some embodiments, the classification algorithm may use a logistical classifier or a linear classifier Wx+b=y, wherein W is weight and b is bias. In some embodiments, the processor may use a neural network to evaluate various cost functions before deciding on a classification. In some embodiments, the neural network may use a softmax activation function

${S\left( y_{i} \right)} = {\frac{e^{y_{i}}}{\sum_{j}e^{y_{j}}}.}$ In some embodiments, the softmax function may receive numbers (e.g., logits) as input and output probabilities that sum to one. In some embodiments, the softmax function may output a vector that represents the probability distributions of a list of potential outcomes. In some embodiments, the softmax function may be equivalent to the gradient of the LogSumExp function LSE(x₁, . . . , x_(n))=log (e^(x) ¹ + . . . +e^(x) ^(n) . In some embodiments, the LogSumExp, with the first argument set to zero, may be equivalent to the multivariable generalization of a single-variable softplus function. In some instances, the softplus function ƒ(x)=log (1+e^(x)) may be used as a smooth approximation to a rectifier. In some embodiments, the derivative of the softplus function

$f^{\prime(x)} = {\frac{e^{x}}{1 + e^{x}} = \frac{1}{1 + e^{- x}}}$ may be equivalent to the logistic function and the logistic sigmoid function may be used as a smooth approximation of the derivative of the rectifier, the Heaviside step function. In some embodiments, the softmax function, with the first argument set to zero, may be equivalent to the multivariable generalization of the logistic function. In some embodiments, the neural network may use a rectifier activation function. In some embodiments, the rectifier may be the positive of its argument ƒ(x)=x⁺=max (0, x), wherein x is the input to a neuron. In embodiments, different ReLU variants may be used. For example, ReLUs may incorporate Gaussian noise, wherein ƒ(x)=max(0, x+Y) with Y˜

(0, σ(x)), known as Noisy ReLU. In one example, ReLUs may incorporate a small, positive gradient when the unit is inactive, wherein

$\begin{matrix} {{f(x)} = \left\{ {\begin{matrix} {{{x{if}x} > 0},} \\ {0.01x{otherwise}} \end{matrix},} \right.} &  \end{matrix}$ known as Leaky ReLU. In some instances, Parametric ReLUs may be used, wherein the coefficient of leakage is a parameter that is learned along with other neural network parameters, i.e.

$\begin{matrix} {{f(x)} = \left\{ {\begin{matrix} {{{x{if}x} > 0},} \\ {{ax}{otherwise}} \end{matrix}.} \right.} &  \end{matrix}$ For α≤1, ƒ(x)=max (x, αx). In another example, Exponential Linear Units may be used to attempt to reduce the mean activations to zero, and hence increase the speed of learning, wherein

${f(x)} = \left\{ {\begin{matrix} {{{x{if}x} > 0},} \\ {{a\left( {e^{x} - 1} \right)}{otherwise}} \end{matrix},} \right.$ α is a hyperparameter, and α≤0 is a constraint. In some embodiments, linear variations may be used. In some embodiments, linear functions may be processed in parallel. In some embodiments, the task of classification may be divided into several subtasks that may be computed in parallel. In some embodiments, algorithms may be developed such that they take advantage of parallel processing built into some hardware.

In some embodiments, the classification algorithm (described above and other classification algorithms described herein) may be pre-trained or pre-labeled by a human observer. In some embodiments, the classification algorithm may be tested and/or validated after training. In some embodiments, training, testing, validation, and/or classification may continue as more sensor data is collected. In some embodiments, sensor data may be sent to the cloud. In some embodiments, training, testing, validation, and/or classification may be executed on the cloud. In some embodiments, labeled data may be used to establish ground truth. In some embodiments, ground truth may be optimized and may evolve to be more accurate as more data is collected. In some embodiments, labeled data may be divided into a training set and a testing set. In some embodiments, the labeled data may be used for training and/or testing the classification algorithm by a third party. In some embodiments, labeling may be used for determining the nature of objects within an environment. For example, data sets may include data labeled as objects within a home, such as a TV and a fridge. In some embodiments, a user may choose to allow their data to be used for various purposes. For example, a user may consent for their data to be used for troubleshooting purposes but not for classification. In some embodiments, a set of questions or settings (e.g., accessible through an application of a communication device) may allow the user to specifically define the nature of their consent.

In some embodiments, the processor of the robot may mark areas in which issues were encountered within the map, and in some cases, may determine future decisions relating to those areas based on the issues encountered. In some embodiments, the processor aggregates debris data and generates a new map that marks areas with a higher chance of being dirty. In some embodiments, the processor of the robot may mark areas with high debris density within the current map. In some embodiments, the processor may mark unexpected events within the map. For example, the processor of the robot marks an unexpected event within the map when a TSSP sensor detects an unexpected event on the right side or left side of the robot, such as an unexpected climb.

In some cases, the processor may use concurrency control which defines the rules that provide consistency of data. In some embodiments, the processor may ignore data a sensor reads when it is not consistent with the preceding data read. For example, when a robot driving towards a wall drives over a bump the pitch angle of the robot temporarily increases with respect to the horizon. At that particular moment, the spatial data may indicate a sudden increase in the L2 norm readings to the wall, however, since the processor knows the robot has a positive velocity and the magnitude of the velocity, the processor marks the spatial data indicating the sudden increase as an outlier.

In some embodiments, the processor may determine decisions based on data from more than one sensor. For example, the processor may determine a choice or state or behavior based on agreement or disagreement between more than one sensor. For example, an agreement between some number of those sensors may result in a more reliable decision (e.g. there is high certainty of an edge existing at a location when data of N of M floor sensors indicate so). In some embodiments, the sensors may be different types of sensors (e.g. initial observation may be by a fast sensor, and final decision may be based on observation of a slower, more reliable sensor). In some embodiments, various sensors may be used and a trained AI algorithm may be used to detect certain patterns that may indicate further details, such as, a type of an edge (e.g., corner versus straight edge).

In some embodiments, the processor of the robotic device autonomously adjusts settings based on environmental characteristics observed using one or more environmental sensors (e.g., sensors that sense attributes of a driving surface, a wall, or a surface of an obstacle in an environment). Examples of methods for adjusting settings of a robot based on environmental characteristics observed are described in U.S. Patent Application No. 62/735,137 and Ser. No. 16/239,410. For example, processor may increase the power provided to the wheels when driving over carpet as compared to hardwood such that a particular speed may be maintained despite the added friction from the carpet. The processor may determine driving surface type using sensor data, wherein, for example, distance measurements for hard surface types are more consistent over time as compared to soft surface types due to the texture of grass. In some embodiments, the environmental sensor is communicatively coupled to the processor of the robotic device and the processor of the robotic device processes the sensor data (a term which is used broadly to refer to information based on sensed information at various stages of a processing pipeline). In some embodiments, the sensor includes its own processor for processing the sensor data. Examples of sensors include, but are not limited to (which is not to suggest that any other described component of the robotic cleaning device is required in all embodiments), floor sensors, debris sensors, obstacle sensors, cliff sensors, acoustic sensors, cameras, optical sensors, distance sensors, motion sensors, tactile sensors, electrical current sensors, and the like. In some embodiments, the optoelectronic system described above may be used to detect floor types based on, for example, the reflection of light. For example, the reflection of light from a hard surface type, such as hardwood flooring, is sharp and concentrated while the reflection of light from a soft surface type, such as carpet, is dispersed due to the texture of the surface. In some embodiments, the floor type may be used by the processor to identify the rooms or zones created as different rooms or zones include a particular type of flooring. In some embodiments, the optoelectronic system may simultaneously be used as a cliff sensor when positioned along the sides of the robotic device. For example, the light reflected when a cliff is present is much weaker than the light reflected off of the driving surface. In some embodiments, the optoelectronic system may be used as a debris sensor as well. For example, the patterns in the light reflected in the captured images may be indicative of debris accumulation, a level of debris accumulation (e.g., high or low), a type of debris (e.g., dust, hair, solid particles), state of the debris (e.g., solid or liquid) and a size of debris (e.g., small or large). In some embodiments, Bayesian techniques are applied. In some embodiments, the processor may use data output from the optoelectronic system to make a priori measurement (e.g., level of debris accumulation or type of debris or type of floor) and may use data output from another sensor to make a posterior measurement to improve the probability of being correct. For example, the processor may select possible rooms or zones within which the robotic device is located a priori based on floor type detected using data output from the optoelectronic sensor, then may refine the selection of rooms or zones posterior based on door detection determined from depth sensor data. In some embodiments, the output data from the optoelectronic system is used in methods described above for the division of the environment into two or more zones.

The one or more environmental sensors may sense various attributes of one or more of these features of an environment, e.g., particulate density, rolling resistance experienced by robot wheels, hardness, location, carpet depth, sliding friction experienced by robot brushes, hardness, color, acoustic reflectivity, optical reflectivity, planarity, acoustic response of a surface to a brush, and the like. In some embodiments, the sensor takes readings of the environment (e.g., periodically, like more often than once every 5 seconds, every second, every 500 ms, every 100 ms, or the like) and the processor obtains the sensor data. In some embodiments, the sensed data is associated with location data of the robotic device indicating the location of the robotic device at the time the sensor data was obtained. In some embodiments, the processor infers environmental characteristics from the sensory data (e.g., classifying the local environment of the sensed location within some threshold distance or over some polygon like a rectangle as being with a type of environment within a ontology, like a hierarchical ontology). In some embodiments, the processor infers characteristics of the environment in real-time (e.g., during a cleaning or mapping session, with 10 seconds of sensing, within 1 second of sensing, or faster) from real-time sensory data. In some embodiments, the processor adjusts various operating parameters of actuators, like speed, torque, duty cycle, frequency, slew rate, flow rate, pressure drop, temperature, brush height above the floor, or second or third order time derivatives of the same. For instance, some embodiments adjust the speed of components (e.g., main brush, peripheral brush, wheel, impeller, lawn mower blade, etc.) based on the environmental characteristics inferred (in some cases in real-time according to the preceding sliding windows of time). In some embodiments, the processor activates or deactivates (or modulates intensity of) functions (e.g., vacuuming, mopping, UV sterilization, digging, mowing, salt distribution, etc.) based on the environmental characteristics inferred (a term used broadly and that includes classification and scoring). In other instances, the processor adjusts a movement path, operational schedule (e.g., time when various designated areas are operated on or operations are executed), and the like based on sensory data. Examples of environmental characteristics include driving surface type, obstacle density, room type, level of debris accumulation, level of user activity, time of user activity, etc.

In some embodiments, the processor of the robotic device marks inferred environmental characteristics of different locations of the environment within a map of the environment based on observations from all or a portion of current and/or historical sensory data. In some embodiments, the processor modifies the environmental characteristics of different locations within the map of the environment as new sensory data is collected and aggregated with sensory data previously collected or based on actions of the robotic device (e.g., operation history). For example, in some embodiments, the processor of a street sweeping robot determines the probability of a location having different levels of debris accumulation (e.g., the probability of a particular location having low, medium and high debris accumulation) based on the sensory data. If the location has a high probability of having a high level of debris accumulation and was just cleaned, the processor reduces the probability of the location having a high level of debris accumulation and increases the probability of having a low level of debris accumulation. Based on sensed data, some embodiments may classify or score different areas of a working environment according to various dimensions, e.g., classifying by driving surface type in a hierarchical driving surface type ontology or according to a dirt-accumulation score by debris density or rate of accumulation.

In some embodiments, the map of the environment is a grid map wherein the map is divided into cells (e.g., unit tiles in a regular or irregular tiling), each cell representing a different location within the environment. In some embodiments, the processor divides the map to form a grid map. In some embodiments, the map is a Cartesian coordinate map while in other embodiments the map is of another type, such as a polar, homogenous, or spherical coordinate map. In some embodiments, the environmental sensor collects data as the robotic device navigates throughout the environment or operates within the environment as the processor maps the environment. In some embodiments, the processor associates each or a portion of the environmental sensor readings with the particular cell of the grid map within which the robotic device was located when the particular sensor readings were taken. In some embodiments, the processor associates environmental characteristics directly measured or inferred from sensor readings with the particular cell within which the robotic device was located when the particular sensor readings were taken. In some embodiments, the processor associates environmental sensor data obtained from a fixed sensing device and/or another robot with cells of the grid map. In some embodiments, the robotic device continues to operate within the environment until data from the environmental sensor is collected for each or a select number of cells of the grid map. In some embodiments, the environmental characteristics (predicted or measured or inferred) associated with cells of the grid map include, but are not limited to (which is not to suggest that any other described characteristic is required in all embodiments), a driving surface type, a room or area type, a type of driving surface transition, a level of debris accumulation, a type of debris, a size of debris, a frequency of encountering debris accumulation, day and time of encountering debris accumulation, a level of user activity, a time of user activity, an obstacle density, an obstacle type, an obstacle size, a frequency of encountering a particular obstacle, a day and time of encountering a particular obstacle, a level of traffic, a driving surface quality, a hazard, etc. In some embodiments, the environmental characteristics associated with cells of the grid map are based on sensor data collected during multiple working sessions wherein characteristics are assigned a probability of being true based on observations of the environment over time.

In some embodiments, the processor associates (e.g., in memory of the robotic device) information such as date, time, and location with each sensor reading or other environmental characteristic based thereon. In some embodiments, the processor associates information to only a portion of the sensor readings. In some embodiments, the processor stores all or a portion of the environmental sensor data and all or a portion of any other data associated with the environmental sensor data in a memory of the robotic device. In some embodiments, the processor uses the aggregated stored data for optimizing (a term which is used herein to refer to improving relative to previous configurations and does not require a global optimum) operations within the environment by adjusting settings of components such that they are ideal (or otherwise improved) for the particular environmental characteristics of the location being serviced or to be serviced.

In some embodiments, the processor generates a new grid map with new characteristics associated with each or a portion of the cells of the grid map at each work session. For instance, each unit tile may have associated therewith a plurality of environmental characteristics, like classifications in an ontology or scores in various dimensions like those discussed above. In some embodiments, the processor compiles the map generated at the end of a work session with an aggregate map based on a combination of maps generated during each or a portion of prior work sessions. In some embodiments, the processor directly integrates data collected during a work session into the aggregate map either after the work session or in real-time as data is collected. In some embodiments, the processor aggregates (e.g., consolidates a plurality of values into a single value based on the plurality of values) current sensor data collected with all or a portion of sensor data previously collected during prior working sessions of the robotic device. In some embodiments, the processor also aggregates all or a portion of sensor data collected by sensors of other robotic devices or fixed sensing devices monitoring the environment.

In some embodiments, the processor (e.g., of a robot or a remote server system, either one of which (or a combination of which) may implement the various logical operations described herein) determines probabilities of environmental characteristics (e.g., an obstacle, a driving surface type, a type of driving surface transition, a room or area type, a level of debris accumulation, a type or size of debris, obstacle density, level of traffic, driving surface quality, etc.) existing in a particular location of the environment based on current sensor data and sensor data collected during prior work sessions. For example, in some embodiments, the processor updates probabilities of different driving surface types existing in a particular location of the environment based on the currently inferred driving surface type of the particular location and the previously inferred driving surface types of the particular location during prior working sessions of the robotic device and/or of other robots or fixed sensing devices monitoring the environment. In some embodiments, the processor updates the aggregate map after each work session. In some embodiments, the processor adjusts speed of components and/or activates/deactivates functions based on environmental characteristics with highest probability of existing in the particular location of the robotic device such that they are ideal for the environmental characteristics predicted. For example, based on aggregate sensory data there is an 85% probability that the type of driving surface in a particular location is hardwood, a 5% probability it is carpet, and a 10% probability it is tile. The processor adjusts the speed of components to ideal speed for hardwood flooring given the high probability of the location having hardwood flooring. Some embodiments may classify unit tiles into a flooring ontology, and entries in that ontology may be mapped in memory to various operational characteristics of actuators of the robotic device that are to be applied.

In some embodiments, the processor uses the aggregate map to predict areas with high risk of stalling, colliding with obstacles and/or becoming entangled with an obstruction. In some embodiments, the processor records the location of each such occurrence and marks the corresponding grid cell(s) in which the occurrence took place. For example, the processor uses aggregated obstacle sensor data collected over multiple work sessions to determine areas with high probability of collisions or aggregated electrical current sensor of a peripheral brush motor or motor of another device to determine areas with high probability of increased electrical current due to entanglement with an obstruction. In some embodiments, the processor causes the robotic device to avoid or reduce visitation to such areas.

In some embodiments, the processor uses the aggregate map to determine a navigational path within the environment, which in some cases, may include a coverage path in various areas (e.g., areas including collections of adjacent unit tiles, like rooms in a multi-room work environment). Various navigation paths may be implemented based on the environmental characteristics of different locations within the aggregate map. For example, the processor may generate a movement path that covers areas only requiring low impeller motor speed (e.g., areas with low debris accumulation, areas with hardwood floor, etc.) when individuals are detected as being or predicted to be present within the environment to reduce noise disturbances. In another example, the processor generates (e.g., forms a new instance or selects an extant instance) a movement path that covers areas with high probability of having high levels of debris accumulation, e.g., a movement path may be selected that covers a first area with a first historical rate of debris accumulation and does not cover a second area with a second, lower, historical rate of debris accumulation.

In some embodiments, the processor of the robotic device uses real-time environmental sensor data (or environmental characteristics inferred therefrom) or environmental sensor data aggregated from different working sessions or information from the aggregate map of the environment to dynamically adjust the speed of components and/or activate/deactivate functions of the robotic device during operation in an environment. For example, an electrical current sensor may be used to measure the amount of current drawn by a motor of a main brush in real-time. The processor may infer the type of driving surface based on the amount current drawn and in response adjusts the speed of components such that they are ideal for the particular driving surface type. For instance, if the current drawn by the motor of the main brush is high, the processor may infer that a robotic vacuum is on carpet, as more power is required to rotate the main brush at a particular speed on carpet as compared to hard flooring (e.g., wood or tile). In response to inferring carpet, the processor may increase the speed of the main brush and impeller (or increase applied torque without changing speed, or increase speed and torque) and reduce the speed of the wheels for a deeper cleaning. Some embodiments may raise or lower a brush in response to a similar inference, e.g., lowering a brush to achieve a deeper clean. In a similar manner, an electrical current sensor that measures the current drawn by a motor of a wheel may be used to predict the type of driving surface, as carpet or grass, for example, requires more current to be drawn by the motor to maintain a particular speed as compared to hard driving surface. In some embodiments, the processor aggregates motor current measured during different working sessions and determines adjustments to speed of components using the aggregated data. In another example, a distance sensor takes distance measurements and the processor infers the type of driving surface using the distance measurements. For instance, the processor infers the type of driving surface from distance measurements of a time-of-flight sensor positioned on, for example, the bottom surface of the robotic device as a hard driving surface when, for example, when consistent distance measurements are observed over time (to within a threshold) and soft driving surface when irregularity in readings are observed due to the texture of for example, carpet or grass. In a further example, the processor uses sensor readings of an image sensor with at least one IR illuminator or any other structured light positioned on the bottom side of the robotic device to infer type of driving surface. The processor observes the signals to infer type of driving surface. For example, driving surfaces such as carpet or grass produce more distorted and scattered signals as compared with hard driving surfaces due to their texture. The processor may use this information to infer the type of driving surface.

In some embodiments, the processor infers presence of users from sensory data of a motion sensor (e.g., while the robotic device is static, or with a sensor configured to reject signals from motion of the robotic device itself). In response to inferring the presence of users, the processor may reduce motor speed of components (e.g., impeller motor speed) to decrease noise disturbance. In some embodiments, the processor infers a level of debris accumulation from sensory data of an audio sensor. For example, the processor infers a particular level of debris accumulation and/or type of debris based on the level of noise recorded. For example, the processor differentiates between the acoustic signal of large solid particles, small solid particles or air to determine the type of debris and based on the duration of different acoustic signals identifies areas with greater amount of debris accumulation. In response to observing high level of debris accumulation, the processor of a surface cleaning robot, for example, increases the impeller speed for stronger suction and reduces the wheel speeds to provide more time to collect the debris. In some embodiments, the processor infers level of debris accumulation using an IR transmitter and receiver positioned along the debris flow path, with a reduced density of signals indicating increased debris accumulation. In some embodiments, the processor infers level of debris accumulation using data captured by an imaging device positioned along the debris flow path. In other cases, the processor uses data from an IR proximity sensor aimed at the surface as different surfaces (e.g. clean hardwood floor, dirty hardwood floor with thick layer of dust, etc.) have different reflectance thereby producing different signal output. In some instances, the processor uses data from a weight sensor of a dustbin to detect debris and estimate the amount of debris collected. In some instances, a piezoelectric sensor is placed within a debris intake area of the robotic device such that debris may make contact with the sensor. The processor uses the piezoelectric sensor data to detect the amount of debris collected and type of debris based on the magnitude and duration of force measured by the sensor. In some embodiments, a camera captures images of a debris intake area and the processor analyzes the images to detect debris, approximate the amount of debris collected (e.g. over time or over an area) and determine the type of debris collected. In some embodiments, an IR illuminator projects a pattern of dots or lines onto an object within the field of view of the camera. The camera captures images of the projected pattern, the pattern being distorted in different ways depending the amount and type of debris collected. The processor analyzes the images to detect when debris is collected and to estimate the amount and type of debris collected. In some embodiments, the processor infers a level of obstacle density from sensory data of an obstacle sensor. For example, in response to inferring high level of obstacle density, the processor reduces the wheel speeds to avoid collisions. In some instances, the processor adjusts a frame rate (or speed) of an imaging device and/or a rate (or speed) of data collection of a sensor based on sensory data.

In some embodiments, a memory of the robotic device includes an internal database of types of debris likely to be encountered within the environment. In some embodiments, the processor identifies the type of debris collected in the environment by using the data of various sensors capturing the features of the debris (e.g., camera, pressure sensor, acoustic sensor, etc.) and comparing those features with features of different types of debris stored in the internal database. In some embodiments, the processor determines the likelihood of collecting a particular type of debris in different areas of the environment based on, for example, current and historical data. For example, a robotic device encounters accumulated dog hair on the surface. Image sensors of the robotic device capture images of the debris and the processor analyzes the images to determine features of the debris. The processor compares the features to those of different types of debris within the internal database and matches them to dog hair. The processor marks the region in which the dog hair was encountered within a map of the environment as a region with increased likelihood of encountering dog hair. The processor increases the likelihood of encountering dog hair in that particular region with increasing number of occurrences. In some embodiments, the processor further determines if the type of debris encountered may be cleaned by a cleaning function of the robotic device. For example, a processor of a robotic vacuum determines that the debris encountered is a liquid and that the robotic device does not have the capabilities of cleaning the debris. In some embodiments, the processor of the robotic device incapable of cleaning the particular type of debris identified communicates with, for example, a processor of another robotic device capable of cleaning the debris from the environment. In some embodiments, the processor of the robotic device avoids navigation in areas with particular type of debris detected.

In some embodiments, the processor may adjust speed of components, select actions of the robot, and adjusts settings of the robot, each in response to real-time or aggregated (i.e., historical) sensor data (or data inferred therefrom). For example, the processor may adjust the speed or torque of a main brush motor, an impeller motor, a peripheral brush motor or a wheel motor, activate or deactivate (or change luminosity or frequency of) UV treatment from a UV light configured to emit below a robot, steam mopping, liquid mopping (e.g., modulating flow rate of soap or water), sweeping, or vacuuming (e.g., modulating pressure drop or flow rate), set a schedule, adjust a path, etc. in response to real-time or aggregated sensor data (or environmental characteristics inferred therefrom). In one instance, the processor of the robot may determine a path based on aggregated debris accumulation such that the path first covers areas with high likelihood of high levels of debris accumulation (relative to other areas of the environment), then covers areas with high likelihood of low levels of debris accumulation. Or the processor may determine a path based on cleaning all areas having a first type of flooring before cleaning all areas having a second type of flooring. In another instance, the processor of the robot may determine the speed of an impeller motor based on most likely debris size or floor type in an area historically such that higher speeds are used in areas with high likelihood of large sized debris or carpet and lower speeds are used in areas with high likelihood of small sized debris or hard flooring. In another example, the processor of the robot may determine when to use UV treatment based on historical data indicating debris type in a particular area such that areas with high likelihood of having debris that can cause sanitary issues, such as food, receive UV or other type of specialized treatment. In a further example, the processor reduces the speed of noisy components when operating within a particular area or avoids the particular area if a user is likely to be present based on historical data to reduce noise disturbances to the user. In some embodiments, the processor controls operation of one or more components of the robot based on environmental characteristics inferred from sensory data. For example, the processor deactivates one or more peripheral brushes of a surface cleaning device when passing over locations with high obstacle density to avoid entanglement with obstacles. In another example, the processor activates one or more peripheral brushes when passing over locations with high level of debris accumulation. In some instances, the processor adjusts the speed of the one or more peripheral brushes according to the level of debris accumulation.

In some embodiments, the processor of the robot may determine speed of components and actions of the robot at a location based on different environmental characteristics of the location. In some embodiments, the processor may assign certain environmental characteristics a higher weight (e.g., importance or confidence) when determining speed of components and actions of the robot. In some embodiments, input into an application of the communication device (e.g., by a user) specifies or modifies environmental characteristics of different locations within the map of the environment. For example, driving surface type of locations, locations likely to have high and low levels of debris accumulation, locations likely to have a specific type or size of debris, locations with large obstacles, etc. may be specified or modified using the application of the communication device.

In some embodiments, the processor may use machine learning techniques to predict environmental characteristics using sensor data such that adjustments to speed of components of the robot may be made autonomously and in real-time to accommodate the current environment. In some embodiments, Bayesian methods may be used in predicting environmental characteristics. For example, to increase confidence in predictions (or measurements or inferences) of environmental characteristics in different locations of the environment, the processor may use a first set of sensor data collected by a first sensor to predict (or measure or infer) an environmental characteristic of a particular location a priori to using a second set of sensor data collected by a second sensor to predict an environmental characteristic of the particular location. Examples of adjustments may include, but are not limited to, adjustments to the speed of components (e.g., a cleaning tool such a main brush or side brush, wheels, impeller, cutting blade, digger, salt or fertilizer distributor, or other component depending on the type of robot), activating/deactivating functions (e.g., UV treatment, sweeping, steam or liquid mopping, vacuuming, mowing, ploughing, salt distribution, fertilizer distribution, digging, and other functions depending on the type of robot), adjustments to movement path, adjustments to the division of the environment into subareas, and operation schedule, etc. In some embodiments, the processor may use a classifier such as a convolutional neural network to classify real-time sensor data of a location within the environment into different environmental characteristic classes such as driving surface types, room or area types, levels of debris accumulation, debris types, debris sizes, traffic level, obstacle density, human activity level, driving surface quality, and the like. In some embodiments, the processor may dynamically and in real-time adjust the speed of components of the robot based on the current environmental characteristics. Initially, the classifier may be trained such that it may properly classify sensor data to different environmental characteristic classes. In some embodiments, training may be executed remotely and trained model parameters may be downloaded to the robot, which is not to suggest that any other operation herein must be performed on the robot. The classifier may be trained by, for example, providing the classifier with training and target data that contains the correct environmental characteristic classifications of the sensor readings within the training data. For example, the classifier may be trained to classify electric current sensor data of a wheel motor into different driving surface types. For instance, if the magnitude of the current drawn by the wheel motor is greater than a particular threshold for a predetermined amount of time, the classifier may classify the current sensor data to a carpet driving surface type class (or other soft driving surface depending on the environment of the robotic device) with some certainty. In other embodiments, the processor may classify sensor data based on the change in value of the sensor data over a predetermined amount of time or using entropy. For example, the processor may classify current sensor data of a wheel motor into a driving surface type class based on the change in electrical current over a predetermined amount of time or entropy value. In response to predicting an environmental characteristic, such as a driving type, the processor may adjust the speed of components such that they are optimal for operating in an environment with the particular characteristics predicted, such as a predicted driving surface type. In some embodiments, adjusting the speed of components may include adjusting the speed of the motors driving the components. In some embodiments, the processor may also choose actions and/or settings of the robot in response to predicted (or measured or inferred) environmental characteristics of a location. In other examples, the classifier may classify distance sensor data, audio sensor data, or optical sensor data into different environmental characteristic classes (e.g., different driving surface types, room or area types, levels of debris accumulation, debris types, debris sizes, traffic level, obstacle density, human activity level, driving surface quality, etc.).

In some embodiments, the processor may use environmental sensor data from more than one type of sensor to improve predictions of environmental characteristics. Different types of sensors may include, but are not limited to, obstacle sensors, audio sensors, image sensors, TOF sensors, and/or current sensors. In some embodiments, the classifier may be provided with different types of sensor data and over time the weight of each type of sensor data in determining the predicted output may be optimized by the classifier. For example, a classifier may use both electrical current sensor data of a wheel motor and distance sensor data to predict driving type, thereby increasing the confidence in the predicted type of driving surface. In some embodiments, the processor may use thresholds, change in sensor data over time, distortion of sensor data, and/or entropy to predict environmental characteristics. In other instances, the processor may use other approaches for predicting (or measuring or inferring) environmental characteristics of locations within the environment.

In some instances, different settings may be set by a user using an application of a communication device (as described above) or an interface of the robot for different areas within the environment. For example, a user may prefer reduced impeller speed in bedrooms to reduce noise or high impeller speed in areas with soft floor types (e.g., carpet) or with high levels of dust and debris. As the robot navigates throughout the environment and sensors collect data, the processor may use the classifier to predict real-time environmental characteristics of the current location of the robotic device such as driving surface type, room or area type, debris accumulation, debris type, debris size, traffic level, human activity level, obstacle density, etc. In some embodiments, the processor assigns the environmental characteristics to a corresponding location of the map of the environment. In some embodiments, the processor may adjust the default speed of components to best suit the environmental characteristics of the location predicted.

In some embodiments, the processor may adjust the speed of components by providing more or less power to the motor driving the components. For example, for grass, the processor decreases the power supplied to the wheel motors to decrease the speed of the wheels and the robotic device and increases the power supplied to the cutting blade motor to rotate the cutting blade at an increased speed for thorough grass trimming.

In some embodiments, the processor may record all or a portion of the real-time decisions corresponding to a particular location within the environment in a memory of the robot. In some embodiments, the processor may mark all or a portion of the real-time decisions corresponding to a particular location within the map of the environment. For example, a processor marks the particular location within the map corresponding with the location of the robot when increasing the speed of wheel motors because it predicts a particular driving surface type. In some embodiments, data may be saved in ASCII or other formats to occupy minimal memory space.

In some embodiments, the processor may represent and distinguish environmental characteristics using ordinal, cardinal, or nominal values, like numerical scores in various dimensions or descriptive categories that serve as nominal values. For example, the processor may denote different driving surface types, such as carpet, grass, rubber, hardwood, cement, and tile by numerical categories, such as 1, 2, 3, 4, 5 and 6, respectively. In some embodiments, numerical or descriptive categories may be a range of values. For example, the processor may denote different levels of debris accumulation by categorical ranges such as 1-2, 2-3, and 3-4, wherein 1-2 denotes no debris accumulation to a low level of debris accumulation, 2-3 denotes a low to medium level of debris accumulation, and 3-4 denotes a medium to high level of debris accumulation. In some embodiments, the processor may combine the numerical values with a map of the environment forming a multidimensional map describing environmental characteristics of different locations within the environment, e.g., in a multi-channel bitmap. In some embodiments, the processor may update the map with new sensor data collected and/or information inferred from the new sensor data in real-time or after a work session. In some embodiments, the processor may generate an aggregate map of all or a portion of the maps generated during each work session wherein the processor uses the environmental characteristics of the same location predicted in each map to determine probabilities of each environmental characteristic existing at the particular location.

In some embodiments, the processor may use environmental characteristics of the environment to infer additional information such as boundaries between rooms or areas, transitions between different types of driving surfaces, and types of areas. For example, the processor may infer that a transition between different types of driving surfaces exists in a location of the environment where two adjacent cells have different predicted type of driving surface. In another example, the processor may infer with some degree of certainty that a collection of adjacent locations within the map with combined surface area below some threshold and all having hard driving surface are associated with a particular environment, such as a bathroom as bathrooms are generally smaller than all other rooms in an environment and generally have hard flooring. In some embodiments, the processor labels areas or rooms of the environment based on such inferred information.

In some embodiments, the processor may command the robot to complete operation on one type of driving surface before moving on to another type of driving surface. In some embodiments, the processor may command the robot to prioritize operating on locations with a particular environmental characteristic first (e.g., locations with high level of debris accumulation, locations with carpet, locations with minimal obstacles, etc.). In some embodiments, the processor may generate a path that connects locations with a particular environmental characteristic and the processor may command the robot to operate along the path. In some embodiments, the processor may command the robot to drive over locations with a particular environmental characteristic more slowly or quickly for a predetermined amount of time and/or at a predetermined frequency over a period of time. For example, a processor may command a robot to operate on locations with a particular driving surface type, such as hardwood flooring, five times per week. In some embodiments, a user may provide the above-mentioned commands and/or other commands to the robot using an application of a communication device paired with the robot or an interface of the robot.

In some embodiments, the processor of the robot determines an amount of coverage that it may perform in one work session based on previous experiences prior to beginning a task. In some embodiments, this determination may be hard coded. In some embodiments, a user may be presented (e.g., via an application of a communication device) with an option to divide a task between more than one work session if the required task cannot be completed in one work session. In some embodiments, the robot may divide the task between more than one work session if it cannot complete it within a single work session. In some embodiments, the decision of the processor may be random or may be based on previous user selections, previous selections of other users stored in the cloud, a location of the robot, historical cleanliness of areas within which the task is to be performed, historical human activity level of areas within which the task is to be performed, etc. For example, the processor of the robot may decide to perform the portion of the task that falls within its current vicinity in a first work session and then the remaining portion of the task in one or more other work sessions.

In some embodiments, the processor of the robot may determine to empty a bin of the robot into a larger bin after completing a certain square footage of coverage. In some embodiments, a user may select a square footage of coverage after which the robot is to empty its bin into the larger bin. In some cases, the square footage of coverage, after which the robot is to empty its bin, may be determined during manufacturing and built into the robot. In some embodiments, the processor may determine when to empty the bin in real-time based on at least one of: the amount of coverage completed by the robot or a volume of debris within the bin of the robot. In some embodiments, the processor may use Bayesian methods in determining when to empty the bin of the robot, wherein the amount of coverage may be used as a priori information and the volume of debris within the bin as posterior information or vice versa. In other cases, other information may be used. In some embodiments, the processor may predict the square footage that may be covered by the robot before the robot needs to empty the bin based on historical data. In some embodiments, a user may be asked to choose the rooms to be cleaned in a first work session and the rooms to be cleaned in a second work session after the bin is emptied.

In some embodiments, the processor may predict energy usage of the robot. In some embodiments, the predicted energy usage of the robot may include estimates of functions that may be performed by the robot over a distance traveled or an area covered by the robot. For example, if a robot is set to perform a steam mop for only a portion of an area, the predicted energy usage may allow for more coverage than the portion covered by the robot. In some embodiments, a predicted need for refueling may be derived from previous work sessions of the robot or from previous work sessions of other robots gathered over time in the cloud. In a point to point application, a user may be presented with a predicted battery charge for distances traveled prior to the robot traveling to a destination. In some embodiments, the user may be presented with possible fueling stations along the path of the robot and may alter the path of the robot by choosing a station for refueling (e.g., using an application or a graphical user interface on the robot). In a coverage application, a user may be presented with a predicted battery charge for different amounts of surface coverage prior to the robot beginning a coverage task. In some embodiments, the user may choose to divide the coverage task into smaller tasks with smaller surface coverage. The user input may be received at the beginning of the session, during the session, or not at all. In some embodiments, inputs provided by a user may change the behavior of the robot for the remaining of a work session or subsequent work sessions. In some embodiments, the user may identify whether a setting is to be applied one-time or permanently. In some embodiments, the processor may choose to allow a modification to take affect during a current work session, for a period of time, a number of work sessions, or permanently. In some embodiments, the processor may divide the coverage task into smaller tasks based on a set of cost functions.

In embodiments, the path plan in a point to point application may include a starting point and an ending point. In embodiments, the path plan in a coverage application may include a starting surface and an ending surface, such as rooms, or parts of rooms, or parts of areas defined by a user or by the processor of the robot. In some embodiments, the path plan may include addition information. For example, for a garden watering robot, the path plan may additionally consider the amount of water in a tank of the robot. The user may be prompted to divide the path plan into two or more path plans with a water refilling session planned in between. The user may also need to divide the path plan based on battery consumption and may need to designate a recharging session. In another example, the path plan of a robot that charges other robots (e.g., robots depleted of charge in the middle of an operation) may consider the amount of battery charge the robot may provide to other robots after deducting the power needed to travel to the destination and the closest charging points for itself. The robot may provide battery charge to other robots through a connection or wirelessly. In another example, the path plan of a fruit picking robot may consider the number of trees the robot may service before a fruit container is full and battery charge. In one example, the path plan of a fertilizer dispensing robot may consider the amount of surface area a particular amount of fertilizer may cover and fuel levels. A fertilizing task may be divided into multiple work sessions with one or more fertilizer refilling sessions and one or more refueling sessions in between.

In some embodiments, the processor of the robot may transmit information that may be used to identify problems the robot has faced or is currently facing. In some embodiments, the information may be used by customer service to troubleshoot problems and to improve the robot. In some embodiments, the information may be sent to the cloud and processed further. In some embodiments, the information may be categorized as a type of issue and processed after being sent the cloud. In some embodiments, fixes may be prioritized based on a rate of occurrence of the particular issue. In some embodiments, transmission of the information may allow for over the air updates and solutions. In some embodiments, an automatic customer support ticket may be opened when the robot faces an issue. In some embodiments, a proactive action may be taken to resolve the issue. For example, if a consumable part of the robot is facing an issue before the anticipated life time of the part, detection of the issue may trigger an automatic shipment request of the part to the customer. In some embodiments, a notification to the customer may be triggered and the part may be shipped at a later time.

In some embodiments, a subsystem of the robot may manage issues the robot faces. In some embodiments, the subsystem may be a trouble manager. For example, a trouble manager may report issues such as a disconnected RF communication channel or cloud. This information may be used for further troubleshooting, while in some embodiments, continuous attempts may be made to reconnect with the expected service. In some embodiments, the trouble manager may report when the connection is restored. In some embodiments, such actions may be logged by the trouble manager. In some embodiments, the trouble manager may report when a hardware component is broken. For example, a trouble manager may report when a charger IC is broken.

In some embodiments, a battery monitoring subsystem may continuously monitor a voltage of a battery of the robot. In some embodiments, a voltage drops triggers an event that instructs the robot to go back to a charging station to recharge. In some embodiments, a last location of the robot and areas covered by the robot are saved such that the robot may continue to work from where it left off. In some embodiments, back to back cleaning many be implemented. In some embodiments, back to back cleaning may occur during a special time. In some embodiments, the robot may charge its batteries up to a particular battery charge level that is required to finish an incomplete task instead of waiting for a full charge. In some embodiments, the second derivative of sequential battery voltage measurements may be monitored to discover if the battery is losing power faster than ordinary. In some embodiments, further processing may occur on the cloud to determine if there are certain production batches of batteries or other hardware that show fault. In such cases, fixes may be proactively announced or implemented.

In some embodiments, the processor of the robot may determine a location and direction of the robot with respect to a charging station of the robot by emitting two or more different IR codes using different presence LEDs. In some embodiments, a processor of the charging station may be able to recognize the different codes and may report the receiving codes to the processor of the robot using RF communication. In some embodiments, the codes may be emitted by Time Division Multiple Access (i.e., different IR emits codes one by one). In some embodiments, the codes may be emitted based on the concept of pulse distance modulation. In some embodiments, various protocols, such as NEC IR protocol, used in transmitting IR codes in remote controls, may be used. Standard protocols such as NEC IR protocol may not be optimal for all applications. For example, each code may contain an 8 bits command and an 8 bits address giving a total of 16 bits, which may provide 65536 different combinations. This may require 108 ms and if all codes are transmitted at once 324 ms may be required. In some embodiments, each code length may be 18 pulses of 0 or 1. In some embodiments, two extra pulses may be used for the charging station MCU to handle the code and transfer the code to the robot using RF communication. In some embodiments, each code may have 4 header high pulses and each code length may be 18 pulses (e.g., each with a value of 0 or 1) and two stop pulses (e.g., with a value of 0). In some embodiments, a proprietary protocol may be used, including a frequency of 56 KHz, a duty cycle of 1/3, 2 code bits, and the following code format: Header High: 4 high pulses, i.e., {1, 1, 1, 1}; Header Low: 2 low pulses, i.e., {0, 0}; Data: logic‘0’ is 1 high pulse followed by 1 low pulse; logic‘1’ is 1 high pulse followed by 3 low pulses; After data, follow by Logic inverse(2'scomplementary); End: 2 low pulses, i.e., {0}, to let the charging station have enough time to handle the code. An example using a code 00 includes: {/Header High/1, 1, 1, 1;/Header Low/0, 0;/Logic‘0’/1, 0;/Logic‘0’/1, 0;/Logic‘1’,‘1’, 2's complementary/1, 0, 0, 0, 1, 0, 0, 0;/End/0, 0}. In some embodiments, the pulse time may be a fixed value. For example, in a NEC protocol, each pulse duration may be 560 us. In some embodiments, the pulse time may be dynamic. For example, a function may provide the pulse time (e.g., cBitPulseLengthUs).

In some embodiments, permutations of possible code words may be organized in an enumerated data structure. In one implementation, there may be eight code words in the enumerated data structure arranged in the following order: No Code, Code Left, Code Right, Code Front, Code Side, Code Side Left, Code Side Right, Code All. Other number of code words may be defined as needed in other implementations. Code Left may be associated with observations by a front left presence LED, Code Right may be associated with observations by a front right presence LED, Code Front may be associated with observations by front left and front right presence LEDs, Code Side may be associated with observations by any, some, or all side LEDs, and Code Side Left may be associated with observations by front left and side presence LEDs. In some embodiments, there may be four receiver LEDs on the dock that may be referred to as Middle Left, Middle Right, Side Left, and Side Right. In other embodiments, one or more receivers may be used.

In some embodiments, the processor of the robot may define a default constructor, a constructor given initial values, and a copy constructor for proper initialization and a de-constructor. In some embodiments, the processor may execute a series of Boolean checks using a series of functions. For example, the processor may execute a function ‘isFront’ with a Boolean return value to check if the robot is in front of and facing the charging station, regardless of distance. In another example, the processor may execute a function ‘isNearFront’ to check if the robot is near to the front of and facing the charging station. In another example, the processor may execute a function ‘isFarFront’ to check if the robot is far from the front of and facing the charging station. In another example, the processor may execute a function ‘isInSight’ to check if any signal may be observed. In other embodiments, other protocols may be used. A person of the art will know how to advantageously implement other possibilities. In some embodiments, inline functions may be used to increase performance.

In some embodiments, the processor of the robot may transmit an initial radio broadcast message to discover other robots capable of communication within the area. In some embodiments, the processor of the robot may discover the existence of another robot capable of communication based on a configuration the processor of the robot performs on the other robot or a command input provided to a graphical user interface. In some embodiments, robots may use TCP/IP for communication. In some embodiments, communication between robots may occur over a layer two protocol. In some embodiments, the robot possesses a MAC address and in some embodiments the processor of the robot transmits the MAC address to other robots or a wireless router. In some embodiments, the processor of a charging station of the robot may broadcast a message to discover other Wi-Fi enabled devices, such as other robots or charging stations capable of communication within the area.

In some embodiments, the robot may collaborate with the other intelligent devices within the environment. In some embodiments, data acquired by other intelligent devices may be shared with the robot and vice versa. For example, a user may verbally command a robot positioned in a different room than the user to bring the user a phone charger. A home assistant device located within the same room as the user may identify a location of the user using artificial intelligence methods and may share this information with the robot. The robot may obtain the information and devise a path to perform the requested task.

In some embodiments, the robot may collaborate with one or more other robot to complete a task. For example, two robots, such as a robotic vacuum and a robotic mop collaborate to clean an area simultaneously or one after the other. In some embodiments, the processors of collaborating robots may share information and devise a plan for completing the task. In some embodiments, the processors of robots collaborate by exchanging intelligence with one other, the information relating to, for example, current and upcoming tasks, completion or progress of tasks (particularly in cases where a task is shared), delegation of duties, preferences of a user, environmental conditions (e.g., road conditions, traffic conditions, weather conditions, obstacle density, debris accumulation, etc.), battery power, maps of the environment, and the like. For example, a processor of a robot may transmit obstacle density information to processors of nearby robots with whom a connection has been established such that the nearby robots can avoid the high obstacle density area. In another example, a processor of a robot unable to complete garbage pickup of an area due to low battery level communicates with a processor of another nearby robot capable of performing garbage pickup, providing the robot with current progress of the task and a map of the area such that it may complete the task. In some embodiments, processors of robots exchange intelligence relating to the environment (e.g., environmental sensor data) or results of historical actions such that individual processors can optimize actions at a faster rate. For example, processors of robots share depth data of objects within an environment to collaboratively build a map of the environment, as is described in U.S. patent application Ser. No. 16/185,000, the entire contents of which is hereby incorporated by reference. In some embodiments, processors of robots collaborate to complete a task. In some embodiments, robots collaborate using methods such as those described in U.S. patent application Ser. Nos. 15/981,643, 14/948,620, 15/986,670, 16/418,988, and 15/048,827, the entire contents of which are hereby incorporated by reference. In some embodiments, a control system may manage the robot or a group of collaborating robots. An example of a control system for managing robots is disclosed in U.S. patent application Ser. No. 16/130,880, the entire contents of which is hereby incorporated by reference.

In some embodiments, a communication device (e.g., cell phone, laptop, tablet, remote, etc. executing a user application paired with the robot), may connect to a cellular network or a Wi-Fi network. FIG. 99 illustrates an example of a network of electronic devices including robots, cell phones, home assistant device, computer, tablet, smart appliance (i.e., fridge), and robot control units (e.g., charging station) within an environment, at least some which may be connected to a cellular or Wi-Fi network. In some embodiments, the communication device prefers to connect to a Wi-Fi network when available and uses a cellular network when a Wi-Fi network is unavailable. In one case, the communication device may not be connected to a home Wi-Fi network and a cellular network may be used. In another case, the communication device may be connected to a home Wi-Fi, however, some communication devices may have a cellular network preference. In some embodiments, preference may be by design. In some embodiments, a user may set a preference in an application of the communication device or within the settings of the communication device. In FIG. 99 , the robots are not directly connected to the LAN while the charging stations are. In one case, the processor of the robot does not receive an IP address and uses an RF communication protocol. In a second case, the processor of the robot receives an IP address but from a different pool than the router distributes. The IP address may not be in a same subnet as the rest of the LAN. In some cases, the charging station may act as a router and provide an IP address to the processor of the robot. FIGS. 100A and 100B illustrate examples of a connection path 10000 for devices via the cloud. In FIG. 100A the robot control unit 1 is connected to cell phone 1 via the cloud. In this case, cell phone 1 is connected to the cloud via the cellular network while the robot control unit 1 is connected to the cloud via the Wi-Fi network. In FIG. 100B the robot control unit 1 is connected to cell phone 2 via the cloud. In this case, cell phone 2 and robot control unit 1 are connected to the cloud via the Wi-Fi network. FIG. 101 illustrates an example of a LAN connection path 10100 between cell phone 2 and robot control unit 1 via the router. For a LAN connection path, costs may be reduced as payment to an internet service provider is not required. However, some services, such as services of a home assistant (e.g., Alexa) or cloud enhancements that may be used with mapping, may not be available. FIG. 102 illustrates a direct connection path 10200 between cell phone 2 and robot control unit 1. In some instances, a direct connection path between devices may be undesirable as the devices may be unable to communicate with other devices in the LAN during the direct connection. For example, a smart phone may not be able to browse the internet during a direct connection with another device. In some instances, a direct connection between devices may be temporarily used. For example, a direct connection between devices may be used during set up of the robot to create an initial communication between a communication device or a charging station and the robot such that the processor of the robot may be provided an SSID that may be used to initially join the LAN. In some embodiments, each device may have its own IP address and communication between devices may be via a router positioned between the devices. FIG. 103 illustrates a connection path 10300 between robot 3 and cell phone 2 via the router. In such cases, there may be no method of communication if the router becomes unavailable. Furthermore, there may be too many IP addresses used. In some embodiments, a variation of this example may be employed, wherein the robot may connect to the LAN while the charging station may connect to the internet through an RF communication method.

In some embodiments, a CPU, MPU, or MCU may be used for processing. In some embodiments, floats may be processed in hardware. In some embodiments, the MPU may be implemented in hardware. In some embodiments, a GPU may be used in a built-in architecture or in a separate unit in the main electronic board. In some embodiments, an intermediary object code may be created and linked and combined into a final code on a target robot.

In some embodiments, a robot boot loader may load a first block of code that may be executed within a memory. In some embodiments, a hash and a checksum of a file chosen for loading may be checked. In some embodiments, the hash and checksum may be printed in a real-time log. In some embodiments, the log may be stored in a memory. In some embodiments, the log may be transmitted over a Wi-Fi network on a computer acting as a terminal. In some embodiments, the transfer protocol may be SSH or telnet. In some embodiments, a security bit may be set in a release build to prohibit tampering of the code. In some embodiments, over the air updates may be possible.

In some embodiments, a customized non-volatile configuration may be read from an NVRAM or flash after the robot boot loader loads the code on the memory. For example, the RF channel may be stored and read as a NVRAM parameter and stored in the flash memory. In some embodiments, two copies of computer code may be stored in an NVRAM of the robot. In embodiments, wherein the robot may not boot (e.g., after an upgrade), a second executive computer code may be used for booting up the robot. In some embodiments, the content of memory of the robot may be dumped into a specific memory that may be later viewed or cleared when a hard fault crash occurs. In some embodiments, the amount of memory may be set to a maximum and the new information may rewrite old information.

In some embodiments, a boot up process of the robot may be interrupted by the user for troubleshooting purposes. In some embodiments, a sequence of characters may be pressed within a particular time frame during the boot up process to interrupt the boot up process. In some embodiments, further controls may be implemented by pressing other sequences of characters which may prompt the robot to perform a certain task. Some examples include ctrl+c to clear entered characters; ctrl+d to start docking; ctrl+g to start cleaning; ctrl+j to display scheduled jobs; ctrl+n to print the map; ctrl+q to show help/list commands; ctrl+r to software reset; ctrl+s to display statistics; ctrl+t to display current trouble; ctrl+v to toggle vacuum; and ctrl+z to stop cleaning/docking.

In some embodiments, the robot may be in various states and each state may have a substate. For example, the robot may enter a ‘Leave Dock Mode’ or a ‘Cleaning Mode’ after boot up. In some embodiments, one or more routine handlers may be used. For example, a routine handler may include an instruction to perform undock, single sweep, and return to origin.

In some embodiments, hardware components of the robot may be initialized one by one. In some embodiments, hardware components may be categorized based on the functions they provide. For example, a motor for a suction fan of a robot with motors for moving and a motor for a suction fan may belong to a cleaning hardware subgroup.

In some embodiments, the latest version of a map may be saved on a non-volatile memory space of the robot or the base station or on the cloud after a first mapping session is complete. In some embodiments, the non-volatile memory space may be an NV RAM available on the MCU. Other locations may include a flash memory, another NVRAM on the main PCB of the robot or the charging station, or on the cloud. Depending on design preference, the map may be stored locally until the next cold reset of the robot. This may be an advantageous embodiment as a cold-reset may indicate the robot is experiencing a change. In some embodiments, this may be the default setting, however other settings may be possible. For example, a user may choose to permanently store the map in the NVRAM or flash. In some embodiments, a map may be stored on the robot as long as the robot is not cold-started or hard-reset. On cold-start or hard-reset, the processor of the robot may pull the map from the cloud. In some embodiments, the processor reuses the map. In some embodiments, wherein the processor may not be able to reuse the map, the processor of the robot may restart mapping from the beginning. Some embodiments statically allocate a fixed area in an SD-RAM of the robot or charging station as SD-RAMs are large and may thus store a large map if needed. In some embodiments, the fixed area in the SD-RAM may be marked as persistent (i.e., the fixed area is not zeroed upon MCU reset). Alternatively, the map may be stored in SRAM, however, inputs provided by a user (e.g., virtual boundaries, scheduling, floor types, zones, perimeter lines, robot settings, etc.) may be lost in the event that the map is lost during a cold-start or hard-reset. In another embodiment, the map may be even more persistent (i.e., stored in a flash memory) by storing a user request in NVRAM (e.g., as a Boolean). If the map is lost and internet access is down, the user request may be checked in the NVRAM. In some embodiments, the processor may conditionally report an error and may not perform work (e.g., sweep) when the user request cannot be honored. In embodiments, various options for storing the map are possible.

In some embodiments, boot up time of the robot may be reduced or performance may be improved by using a higher frequency CPU. In some instances, an increase in frequency of the processor may decrease runtime for all programs. In some instances, power consumption, P=C×V²×F, by a chip may be determined, wherein C is the capacitance switched per clock cycle (in proportion to the number of transistors with changing inputs), V is the voltage, and F is the processor frequency (e.g., cycles per second). In some instances, higher frequency processing hardware consumes more power. In some cases, increase of frequency may be limited by technological constraints. Moore's law predicts faster and more powerful computers are built over time. However, to execute a number of sophisticated algorithms using current hardware, there may be a need for a combination of software enhancements, algorithm creativity, and parallel and concurrent processing.

In some cases, processing in parallel may not provide its full advantages or may be less advantageous for situations where some calculations may depend on prior calculations or data. For example, displacement of a robot may only be identified when the robot moves and sensors of the robot record the movement and other sensors of the robot confirm the movement. At which point, the processor may use the data to update the location of the robot. Theoretically, an increase in speed from parallelization is linear as doubling the number of processing elements reduces the runtime to half. However, in some cases, parallel algorithms may not double the runtime. While some processes may be processed faster linearly, in general, the gain in performance reduces with complexity. In some embodiments, the potential speedup of an algorithm on a parallel computing platform may be determined used Amdahl's law,

${{S(s)} = \frac{1}{1 - p + \frac{p}{s}}},$ wherein S is the potential speedup in latency of the execution of the whole task, s is the speedup in latency of the execution of the parallelizable part of the task, and p is the percentage of the execution time of the whole task concerning the parallelizable part of the task before parallelization. In some embodiments, parallelization techniques may be advantageously used in situations where they may produce the most results, such as rectified linear unit functions (ReLU) and image processing. In some probabilistic methods, computational cost may increase in quadruples or more. This may be known as a dimensionality curse. In some instances, linear speed up may not be enough in execution of complex tasks if the algorithms and the low level code are written carelessly. As complexity of components increase, the increase in computational cost may become out of control.

In some embodiments, concurrent computations may be executed during overlapping time periods. In some embodiments, the output of a computation may be required to be used as input of another computation. For example, a processor may receive and convolve various sensor data and the output may be used by the processor to generate a map. In some embodiments, the processor of the robot may share contents of a memory space dedicated to a process to another process to save on messaging time. In some embodiments, processes and threads may be executed in parallel on multiple cores. In some embodiments, each process may be assigned to a separate processor or processor core, or a computation may be distributed across multiple devices in a connected network of robotic devices. For example, a host processor executing a for loop required to run 1000 iterations on the host processing unit one after another may delegate the task to a secondary processing device by launching a kernel on the secondary processing device. A block of 1000 individual threads may be launched on the secondary processing device in parallel to achieve a higher throughput. Or the host processor may delegate two blocks of 500 threads each. In some embodiments, latency may be reduced by optimizing the amount of time required for completion of a task. In some embodiments, latency may be sacrificed to instruct a secondary processing device to run multiple threads in an attempt to optimize throughput. In some cases, sophisticated handling of memory space is essential to refrain from memory spaces being shared or leaked between different processes when components that operate concurrently interact by accessing data in real-time as opposed to sending data in a form of messages to one another.

In some embodiments, processes may be further divided to threads and fibers. For example, thread A may update a memory spot with a variable and thread B may read that variable at the next clock interval. This may be helpful in saving resources when multiple threads need access to the same data and may provide better performance compared to that resulting from thread A being passed into thread B.

In some cases, memory management may be implemented from the lowest level of design to improve performance of the robot system. In some instances, intelligent use of registers may save on overhead. In some cases, use of cache memory may enhance performance. In some instances, to achieve a well designed system, quantities such as hit ratio may be properly monitored and optimized. In some embodiments, various memory mapping techniques may be used, such as direct mapping, associative mapping, and set-associative mapping. In some embodiments, a Memory Management Unit (MMU) or Memory Protection Unit (MPU) may be implemented in hardware or software. In some embodiments, cache memory may be used to enhance performance. FIG. 104 illustrates an example of flow of information between CPU, cache memory, primary memory, and secondary memory.

In some embodiments, a Light Weight SLAM algorithm may process spatial data in real-time, generally without buffering or any delay caused by a multi-purpose operating system (OS) such as, Linux, Windows, or Mac OS, acting as an interface between the SLAM algorithm, sensors, and hardware. In some embodiments, a real-time OS may be used. In some embodiments, a Kernel may be used. In some cases, a scheduler may define a time bound system with well defined fixed time constraints. In some embodiments, the scheduler temporarily interrupts low priority tasks and schedules them for resumption at a later time when a high priority or privileged tasks require attention. In some embodiments, a real-time OS handles scheduling, control of the processor, allocation of memory, and input/output devices. In some embodiments, a scheduler block of code may be included in the architecture of the robot system which may also be responsible for controlling the memory, registers, input/output and cleanup of the memory after completion of each task. In some embodiments, the architecture may consist of a kernel which has direct access to privileged underlying hardware. In some embodiments, a Kernel may abstract the hardware and control mechanisms such as create, schedule, open, write, and allocate. In some embodiments, a Kernel may also control, process, thread, socket, and page memory. In some embodiments, a Kernel may enforce policies such as random access, least recently used, or earliest deadline first. In some embodiments, system calls may be implemented to provide access to underlying hardware for high-up processes. In some embodiments, a bit may be set and unset (or vice versa) when a process moves from a kernel mode to a higher level and back. In some embodiments, arguments and parameters may be passed directly between a higher level code and a kernel, or through a register. In some embodiments, a Kernel may trap an illegitimate instruction of memory access request. In some embodiments, a Kernel may send a signal to a process. In some embodiments, a Kernel may assign an ID to a task or process or a group of tasks or processes. In some embodiments, additional software modules or blocks may be installed in the robot system for future needs. In some embodiments, sensor readings may be passed (e.g., as an output) to a Kernel. In some embodiments, a sensor reading may be kept in a memory space and a Kernel may read that memory space in turns. In some embodiments, a Kernel may read a sensor reading from another location. In some embodiments, a Kernel obtains sensor readings without any passing or transferring or reading. All approaches of obtaining sensor readings may be used in an implementation.

In some embodiments, a scheduler may be provisioned to allot a certain amount of time to execution of each thread, task, tasklet, etc. For example, a first thread may run for 10 consecutive milliseconds then may be unscheduled by the scheduler to allow a second thread to run for the next 10 consecutive seconds. Similarly, a third thread may follow the second thread. This may continue until the last thread passes the control to the first thread again. In some embodiments, these slices of time may be allocated to threads with a same level of priority on a round robin basis. In some embodiments, each thread may be seen as an object which performs a specific function. In some embodiments, each thread may be assigned a thread ID. In some embodiments, a state of a running thread variable may be stored in a thread stack each time threads are switched. In some embodiments, each thread that is not in a running state (i.e., is in control of a processor or microcontroller) may be in a ready state or a wait state. In a ready state the thread may be ready to run after the current running thread is unscheduled. All other threads may be in a wait state. In some embodiments, priorities may be assigned to threads. A thread with higher priority may preempt threads with lower priorities. In some embodiments, the number of concurrently running threads may be decided in conjunction with thread stack size and other parameters, such as running in default stack or having additional memory space to run in.

In some embodiments, locking methods may be used. In other embodiments, multi-versioning may be used. In some embodiments, multi-versioning may converge to uni-versioning in later time slots. In some embodiments, multi-versioning may be used by design. For example, if transaction T_(i) wants to write to object P, and there is another transaction T_(k) occurring to the same object, the read timestamp RTS(T_(i)) must precede the read timestamp RTS(T_(k)) for the object write operation to succeed. In other words, a write cannot complete if there are other outstanding transactions with an earlier read timestamp RTS to the same object. Every object P has a timestamp TS, however if transaction T_(i) wants to write to an object, and the transaction has a timestamp

is earlier than the object's current read timestamp, then the transaction is aborted and restarted, as a later transaction already depends on the old value. Otherwise, T_(i) creates a new version of object P and sets the read/write timestamp TS of the new version to the timestamp of the transaction TS=TS(T_(i)).

In some embodiments, a behavior tree may be used to abstract the complexities of lower level implementations. In some embodiments, a behavior tree may be a mathematical model of plan execution wherein very complex tasks may be composed of simple tasks. In some embodiments, a behavior tree may be graphically represented as a directed tree. In implementation, nodes may be classified as root, control flow nodes, or execution nodes (i.e., tasks). For a pair of connected nodes, the outgoing node may be referred to as a parent and the incoming node as a child. A root node may have no parents and only one child, a control flow node may have one parent and at least one child and an execution node may have one parent and no children. The behavior tree may begin from the root which transmits ticks (i.e., enabling signal) at some frequency to its child to allow execution of the child. In some embodiments, when the execution of a node is allowed, the node may return a status of running, success, or failure to the parent. A control flow node may be used to control the subtasks from which it is composed. The control flow node may either be a fallback or sequence node, which run each of their subtasks in turns. When a subtask is completed and returns a status, the control flow node may decide if the next subtask is to be executed. Fallback nodes may find and execute the first child that does not fail, wherein children may be ticked in order of importance. Sequence nodes may find and execute the first child that has not yet succeeded. In some embodiments, the processor of the robot may define a behavior tree as a three-tuple, T_(i)={ƒ_(i), r_(i), Δt}, wherein i ∈

is the index of the tree, ƒ_(i):

_(n)→

_(n) is a vector field representing the right has side of an ordinary difference equation, Δt is a time step, and r_(i):

^(n)→{R_(i), S_(i), F_(i)} is the return status, that can be equal to either running R_(i), success S_(i), or failure F_(i). In some embodiments, the processor may implement ordinary difference equations x_(k+t) (t_(k+1))=ƒ_(i) (x_(k) (t_(k))) with t_(k+1)=t_(k)+Δt, wherein k ∈

represents the discrete time and x ∈

^(n) is the state space of the system modelled, to execute the behavior tree. In some embodiments, the processor uses a fallback operator to compose a more complex behavior tree T₀ from two behavior trees T_(i) and T_(j), wherein T₀=fallback(T_(i), T_(j)). The return status r₀ and the vector field ƒ₀ associated with T₀ may be defined by

${r_{0}\left( x_{k} \right)} = \left\{ {{\begin{matrix} {{r_{j}\left( x_{k} \right)}\text{  }} & {{{if}x_{k}} \in \mathcal{F}_{1}} \\ {r_{i}\left( x_{k} \right)} & {otherwise} \end{matrix}{and}\ {f_{0}\left( x_{k} \right)}} = \left\{ {\begin{matrix} {{f_{j}\left( x_{k} \right)}\ } & {{{if}x_{k}} \in \mathcal{F}_{1}} \\ {{f_{i}\left( x_{k} \right)}\ } & {otherwise} \end{matrix}.} \right.} \right.$ In some embodiments, the processor uses a sequence operator to compose a more complex behavior tree T₀ from two behavior trees T_(i) and T_(j), wherein T₀=sequence(T_(i), T_(j)). The return status r₀ and the vector field ƒ₀ associated with T₀ may be defined by

${r_{0}\left( x_{k} \right)} = \left\{ {{\begin{matrix} {r_{j}\left( x_{k} \right)} & {{{if}x_{k}} \in \mathcal{S}_{1}} \\ {r_{i}\left( x_{k} \right)} & {otherwise} \end{matrix}{and}{f_{0}\left( x_{k} \right)}} = \left\{ {\begin{matrix} {f_{j}\left( x_{k} \right)} & {{{if}x_{k}} \in \mathcal{S}_{1}} \\ {f_{i}\left( x_{k} \right)} & {otherwise} \end{matrix}.} \right.} \right.$

In some embodiments, a thread, task, or interrupt may be configured to control a GPIO pin, PIO pin, PWM pin, and timer pin connected to an IR LED transmitter that may provide illumination for a receiver expecting a single IR multi-path reflection of the IR LED off of a surface (e.g., floor). In some embodiments, a while loop or other types of loops may be configured to iterate with each clock as a continuous thread. In some embodiments, a lack of presence of a reflection may set a counter to increase a last value by unity. In some embodiments, the counter may be reset upon receipt of a next reflection. In some embodiments, a new thread with a higher priority may preempt the running thread when a value of the counter reaches a certain threshold. In some embodiments, a thread may control other pins and may provide PWM capabilities to operate the IR transmitter at a 50% duty cycle (or at 10%, 70%, 100% or other percentage duty cycle) to control the average intensity or the IR emission. In some embodiments, the receiver may be responsive to only a certain frequency (e.g., 38 Khz). In some embodiments, the receiver may be able to count the number of pulses (or lack thereof) in addition to a presence or lack of presence of light. In some embodiments, other methods of modulating code words or signals over different mediums may be used. In some instances, code words need to be transmitted directionally and quickly, which, with current technologies, may be cost prohibitive. Examples of mediums that may be used other than IR include other spectrums of light, RF using directional and non-directional antennas, acoustic using directional, highly directional, and non-directional antennas, microphones, ultra-sonic, etc. In some embodiments, in addition or in combination or in place of PWM, other modulation methods such as Amplitude Modulation (AM) or Frequency Modulation (FM) may be used.

In some embodiments, specular reflection, surface material, angle of the surface normal, ambience light decomposition and intensity, the saturation point of the silicon chip on the receiver, etc. may play a role in how and if a receiver receives a light reflection. In some embodiments, cross talk between sensors may also have an influence. In some embodiments, dedicated allocation of a time slot to each receiver may serve as a solution. In some embodiments, the intensity of the transmitter may be increased with the speed of the robot to observe further at higher speeds. In various environments, a different sensor or sensor settings may be used. In some behavioral robots, a decision may be made based on a mere lack of reflection or presence of a reflection. In some embodiments, counting a counter to a certain value may change the state of a state machine or a behavior tree or may break an iteration loop. In some embodiments, this may be described as a deterministic function wherein state transition=ƒ(˜receipt of reflection). In other embodiments, state transition=ƒ(counter+1>x). In some embodiments, a probabilistic method may be used wherein statetransition=P (observation X|observation Y), wherein X and Y may be observations independent of noise impact by one or more sensors observed at the same or different time stamps.

In some embodiments, information from the memory of the robot may be sent to the cloud. In some embodiments, user permission may be requested prior to sending information to the cloud. In some embodiments, information may be compressed prior to being sent. In some embodiments, information may be encrypted prior to being sent.

In some embodiments, memory protection for hardware may be used. For example, secure mechanisms are essential when sending and obtaining spatial data to and from the cloud as privacy and confidentiality are of highest importance. In embodiments, information is not disclosed to unauthorized individuals, groups, processes, or devices. In embodiments, highly confidential data is encrypted such third parties may not easily decrypt the data. In embodiments, impersonation is impossible. For example, a third party is unable to insert an unauthentic map or data in replacement of the real map or data. In embodiments, security begins at the data collection level. In embodiments, information processed is inaccessible by a third party. In embodiments, executable code (e.g., SLAM code, coverage code, etc.) and the map (and any related information) are not retrievable from a stored location (e.g., flash or NVRAM or other storage) and are sealed and secured. In some embodiments, encryption mechanisms may be used. In embodiments, permission from the user is required when all or part of map is sent to the cloud. In embodiments, permission from the user is recorded and stored for future references. In embodiments, the method of obtaining permission from the user is such a third party, including the manufacturer, cannot fabricate a permission on behalf of the user. In some embodiments, a transmission channel may be encrypted to prohibit a third party from eavesdropping and translating the plain text communication into a spatial representation of a home of the user. For example, software such as Wireshark may be able to read clear text when connected to a home router and other software may be used to present the data payload into spatial formats. In embodiments, data must remain secure in the cloud. In some embodiments, only an authorized party may decrypt the encrypted information. In some embodiments, data may be encrypted with either symmetric or asymmetric methods, or hashing. Some embodiments may use a secret key or public-private key. In some embodiments, the robot may use data link protocols to connect within a LAN or user IP layer protocols with IPV4 or IPV6 addresses for communication purposes. In some embodiments, communication may be connection based (e.g., TCP) or connectionless (e.g., UDP). For time-sensitive information, UDP may be used. For communication that requires receipt at the other side, TCP may be used. In some embodiments, other encryption frameworks such as IPsec and L2TP may be used.

In some embodiments, information may be marked as acceptable and set as protected by the user. In some embodiments, the user may change a protection setting of the information to unprotected. In some embodiments, the processor of the robot does not have the capacity to change the protection setting of the information. In order to avoid situations wherein the map becomes corrupt or localization is compromised, the Atomicity, Consistency, Isolation, and Durability (ACID) rules may be observed. In some cases, atomicity may occur when a data point is inconsistent with a previous data point and corrupts the map. In some cases, a set of constraints or rules may be used to provide consistency of the map. For example, after executing an action or control from a consistent initial state a next state must be guaranteed to reach a consistent state. However, this does not negate the kidnapped robot issue. In such a case, a control defined as picking the robot up may be considered to produce a consistent action. Similarly, an accelerometer may detect a sudden push. This itself may be an action to define a rule that may keep information consistent. These observations may be included at all levels of implementation and may be used in data sensing subsystems, data aggregation subsystems, schedulers, or algorithm level subsystems. In some embodiments, mutual exclusion techniques may be used to provide consistency of data. In some embodiments, inlining small functions may be used to optimize performance.

FIG. 105 illustrates an example of the subsystems of the robot described herein, wherein global and local mapping may be used in localization of the robot and vice versa, global and local mapping may be used in map filling, map filling may be used in determining cell properties of the map, cell properties may be used in establishing zones, creating subzones, and evaluating traversability, and subzones and traversability may be used for polymorphic path planning.

The methods and techniques described herein may be used with various types of robotic devices such as a surface cleaning robotic device (e.g., mop, vacuum, pressure cleaner, steam cleaner, etc.), a robotic router, a robot for item or food delivery, a restaurant server robot, a first aid robot, a robot for transporting passengers, a robotic charger, an image and video recording robot, an outdoor robotic sweeper, a robotic mower, a robotic snow plough, a salt or sand spreading robot, a multimedia robotic device, a robotic cooking device, a car washing robotic device, a robotic hospital bed, and the like. Some examples are described in U.S. Patent Application Nos. 62/772,026 and 62/774,420, the entire contents of which are hereby incorporated by reference.

FIG. 106 illustrates an example of a robot 10600 with processor 10601, memory 10602, a first set of sensors 10603, second set of sensors 10604, network communication 10605, movement driver 10606, signal receiver 10607, and one or more tools 10608. In some embodiments, the robot may include the features of a robot described herein. In some embodiments, program code stored in the memory 10602 and executed by the processor 10601 may effectuate the operations described herein. Some embodiments additionally include user communication device 10609 having a touchscreen 10610 with a software application coupled to the robot 10600, such as that described in U.S. patent application Ser. Nos. 15/272,752, 15/949,708, and 16/277,991, the entire contents of which is hereby incorporated by reference. For example, the application may be used to provide instructions to the robot, such as days and times to execute particular functions and which areas to execute particular functions within. Examples of scheduling methods are described in U.S. patent application Ser. Nos. 16/051,328 and 15/449,660, the entire contents of which are hereby incorporated by reference. In other cases, the application may be used by a user to modify the map of the environment by, for example, adjusting perimeters and obstacles and creating subareas within the map. The robot 10600 may recharge at charging station 10611.

In some embodiments, the processor of the robot may transmit the map of the environment to an application of a communication device (e.g., for a user to access and view). In some embodiments, the map may include information such as debris accumulation in different areas, stalls encountered in different areas, obstacles, driving surface type, etc.

In some embodiments, the user may choose areas they would like a mobile robotic device to operate in and what actions a user would like the device to partake in. In some embodiments, a user may answer a questionnaire using an application of a communication device to determine general preferences of the user. In some embodiments, the user may answer the questionnaire before providing other information. In some embodiments, the processor of the robot may acquire information from external sources, such as other smart devices within the home. For example, the processor may acquire data from an external source that is indicative of the times of the day that a user is unlikely to be home and may clean the home during these times. Information may be obtained from, for example, other sensors within the home, smart home devices, location services on a smart phone of a user, or sensed activity within the home.

In some embodiments, a historical report of prior work sessions may be accessed by a user using the application of the communication device. In some embodiments, the historical report may include a total number of operation hours per work session or historically, total number of charging hours per charging session or historically, total coverage per work session or historically, a surface coverage map per work session, issues encountered (e.g., stuck, entanglement, etc.) per work session or historically, location of issues encountered (e.g., displayed in a map) per work session or historically, collisions encountered per work session or historically, software or structural issues recorded historically, and components replaced historically.

In some embodiments, the robot may perform work in or navigate to or transport an item to a location specified by the user. In some embodiments, the user may instruct the robot to perform work in a specific location using an application of a communication device communicatively paired with the processor of the robot. For example, a user may instruct a robotic mop to clean an area in front of a fridge where coffee has been spilled or a robotic vacuum to vacuum an area in front of a TV where debris often accumulates or an area under a dining table where cheerios have been spilled. In another example, a robot may be instructed to transport a drink to a location in front of a couch on which a user is positioned while watching TV in the living room. In some embodiments, the robot may use direction of sound to navigate to a location of the user. For example, a user may verbally instruct a robot to bring the user medicine and the robot may navigate to the user by following a direction of the voice of the user. In some embodiments, the robot includes multiple microphones and the processor determines the direction of a voice by comparing the signal strength in each of the microphones. In some embodiments, the processor may use artificial intelligence methods and Bayesian methods to identify the source of a voice.

In some embodiments, a map, traversability, a path plan (e.g., coverage area and boustrophedon path), and a trajectory of the robot may be displayed to a user (e.g., using an application of a communication device). In some instances, there may be no need or desire by a user to view spatial information for a surface cleaning device that cleans on a daily basis. However, this may be different in other cases. For example, in the case of augmented reality or virtual reality experienced by a user (e.g., via a headset or glasses), a layer of a map may be superimposed on a FOV of the user. In some instances, the user may want to view the environment without particular objects. For example, for a virtual home, a user may want to view a room without various furniture and decoration. In another example, a path plan may be superimposed on the windshield of an autonomous car driven by a user. The path plan may be shown to the user in real-time prior to its execution such that the user may adjust the path plan. FIG. 98 illustrates a user is sitting behind a steering wheel 9800 of an autonomous car (which may not be necessary in an autonomous car but is shown to demonstrate the user with respect to the surroundings) and a path plan 9801 shown to the user, indicating with an arrow a plan for the autonomous car to overtake the car 9802 in front. The user may have a chance to accept or deny or alter the path plan. The user may intervene initially or when the lane change is complete or at another point. The path plan may be superimposed on the windshield using a built-in capability of the windshield that may superimpose images, icons, or writing on the windshield glass (or plastic or other material). In other cases, images, icons, or writing may be projected onto the transparent windshield (or other transparent surface, e.g., window) by a device fixed onto the vehicle or a device the user is wearing. In some cases, superimposition of images, icons, writing, etc. may take place on a surface of a wearable device of the user, such as glasses or headsets. In some embodiments, the surface on which superimposition occurs may not be transparent. In some embodiments, cameras may capture real-time images of the surroundings and the images may be shown to the user on a screen or by another means. In some embodiments, the user may have or be presented with options of objects they wish to be superimposed on a screen or a transparent surface or their FOV. In cases of superimposition of reality with augmenting information, icons, or the like, simultaneous localization and mapping in real-time may be necessary, and thus the SLAM techniques used must to be able to make real-time adjustments.

In some embodiments, the map of the environment may be accessed through an application of a communication device and displayed on a screen of the communication device, e.g., on a touchscreen. In some embodiments, the processor of the Robot sends the map of the environment to the application at various stages of completion of the map or after completion. In some embodiments, a client application on the communication device displays the map on the screen and receives a variety of inputs indication commands, using a user interface of the application (e.g., a native application) displayed on the screen of the communication device. Examples of graphical user interfaces are described in U.S. patent application Ser. Nos. 15/272,752 and 15/949,708, the entire contents of each of which are hereby incorporated by reference. Some embodiments present the map to the user in special-purpose software, a web application, or the like, in some cases in a corresponding user interface capable of receive commands to make adjustments to the map or adjust settings of the Robot and any of its structures or components. In some embodiments, after selecting all or a portion of the perimeter line, the user is provided by embodiments with various options, such as deleting, trimming, rotating, elongating, shortening, redrawing, moving (in four or more directions), flipping, or curving, the selected perimeter line. In some embodiments, the user interface includes inputs by which the user adjusts or corrects the map perimeters displayed on the screen or applies one or more of the various options to the perimeter line using their finger or by providing verbal instructions, or in some embodiments, an input device, such as a cursor, pointer, stylus, mouse, button or buttons, or other input methods may serve as a user-interface element by which input is received. In some embodiments, the user interface presents drawing tools available through the application of the communication device. In some embodiments, the application of the communication device sends the updated map to the processor of the Robot using a wireless communication channel, such as Wi-Fi or Bluetooth.

In some embodiments, the map generated by the processor of the robot (or one or remote processors) contains errors, is incomplete, or does not reflect the areas of the environment that the user wishes the robot to service. By providing an interface by which the user may adjust the map, some embodiments obtain additional or more accurate information about the environment, thereby improving the Robot's ability to navigate through the environment or otherwise operate in a way that better accords with the user's intent. For example, via such an interface, the user may extend the boundaries of the map in areas where the actual boundaries are further than those identified by sensors of the Robot, trim boundaries where sensors identified boundaries further than the actual boundaries, or adjusts the location of doorways. Or the user may create virtual boundaries that segment a room for different treatment or across which the robot will not traverse. In some cases where the processor creates an accurate map of the environment, the user may adjust the map boundaries to keep the Robot from entering some areas.

In some embodiments, data is sent between the processor of the robot and the application of the communication device using one or more wireless communication channels such as Wi-Fi or Bluetooth wireless connections. In some cases, communications are relayed via a remote cloud-hosted application that mediates between the robot and the communication device, e.g., by exposing an application program interface by which the communication device accesses previous maps from the robot. In some embodiments, the processor of the Robot and the application of the communication device are paired prior to sending data back and forth between one another. In some cases, pairing may include exchanging a private key in a symmetric encryption protocol, and exchanges may be encrypted with the key.

In some embodiments, via the user interface (which may be a single screen, or a sequence of displays that unfold over time), the user creates different areas within the environment. In some embodiments, the user selects areas within the map of the environment displayed on the screen using their finger or providing verbal instructions, or in some embodiments, an input device, such as a cursor, pointer, stylus, mouse, button or buttons, or other input methods. Some embodiments may receive audio input, convert the audio to text with a speech-to-text model, and then map the text to recognized commands. In some embodiments, the user labels different areas of the environment using the user interface of the application. In some embodiments, the user selects different settings, such as tool, cleaning and scheduling settings, for different areas of the environment using the user interface. In some embodiments, the processor autonomously divides the environment into different areas and in some instances, the user adjusts the areas of the environment created by the processor using the user interface. Examples of methods for dividing an environment into different areas and choosing settings for different areas are described in U.S. patent application Ser. Nos. 14/817,952, 16/198,393, and 15/619,449, the entire contents of each of which are hereby incorporated by reference.

In some embodiments, the user adjusts or chooses tool settings of the robot using the user interface of the application of the communication device and designates areas in which the tool is to be applied with the adjustment. Examples of tools of a robot customized to function as a surface cleaning robot include a suction tool (e.g., a vacuum), a mopping tool (e.g., a mop), a sweeping tool (e.g., a rotating brush), a main brush tool, a side brush tool, and an ultraviolet (UV) light capable of killing bacteria. Tool settings that the user can adjust using the user interface may include activating or deactivating various tools, impeller motor speed for suction control, fluid release speed for mopping control, brush motor speed for vacuuming control, and sweeper motor speed for sweeping control. In some embodiments, the user chooses different tool settings for different areas within the environment or schedules particular tool settings at specific times using the user interface. For example, the user selects activating the suction tool in only the kitchen and bathroom on Wednesdays at noon. In some embodiments, the user adjusts or chooses robot cleaning settings using the user interface. robot cleaning settings include, but are not limited to, robot speed settings, movement pattern settings, cleaning frequency settings, cleaning schedule settings, etc. In some embodiments, the user chooses different robot cleaning settings for different areas within the environment or schedules particular robot cleaning settings at specific times using the user interface. For example, the user chooses areas A and B of the environment to be cleaned with the robot at high speed, in a boustrophedon pattern, on Wednesday at noon every week and areas C and D of the environment to be cleaned with the robot at low speed, in a spiral pattern, on Monday and Friday at nine in the morning, every other week. In addition to the robot settings of areas A, B, C, and D of the environment the user selects tool settings using the user interface as well. In some embodiments, the user chooses the order of covering or operating in the areas of the environment using the user interface. In some embodiments, the user chooses areas to be excluded using the user interface. In some embodiments, the user adjusts or creates a coverage path of the robot using the user interface. For example, the user adds, deletes, trims, rotates, elongates, redraws, moves (in all four directions), flips, or curves a selected portion of the coverage path. In some embodiments, the user adjusts the path created by the processor using the user interface. In some embodiments, the user chooses an area of the map using the user interface and applies particular tool and/or operational settings to the area. In other embodiments, the user chooses an area of the environment from a drop-down list or some other method of displaying different areas of the environment.

A process of customizing robot operation using a user interface may include selecting any size area (e.g., the selected area may be comprised of a small portion of the environment or could encompass the entire environment) or zone within a map displayed on a screen of a communication device and the user selecting desired settings for the selected area. For example, in some embodiments, a user can select any of: cleaning modes, frequency of cleaning, intensity of cleaning, power level, navigation methods, driving speed, etc. The selections made by the user are sent to a processor of the robot and the processor of the robot processes the received data and applies the user changes.

FIG. 107A illustrates an overhead view of an environment 22300. This view shows the actual obstacles of the environment with outer line 22301 representing the walls of the environment 22300 and the rectangle 22302 representing a piece of furniture. FIG. 107B illustrates an overhead view of a two-dimensional map 22303 of the environment 22300 created by a processor of the robot using environmental data collected by sensors. Because the methods for generating the map are not 100% accurate, the two-dimensional map 22303 is approximate and thus performance of the robot may suffer as its navigation and operations within the environment are in reference to the map 22303. To improve the accuracy of the map 22303, a user may correct the perimeter lines of the map to match the actual obstacles via a user interface of, for example, an application of a communication device. FIG. 107C illustrates an overhead view of a user-adjusted two-dimensional map 304. By changing the perimeter lines of the map 22303 (shown in FIG. 107B) created by the processor of the robot, a user is enabled to create a two-dimensional map 22304 of the environment 22300 (shown in FIG. 107A) that accurately identifies obstacles and boundaries in the environment. In this example, the user also creates areas 22305, 22306, and 22307 within the two-dimensional map 22304 and applies particular settings to them using the user interface. By delineating a portion 22305 of the map22 304, the user can select settings for area 22305 independent from all other areas. For example, for a surface cleaning robot the user chooses area 22305 and selects weekly cleaning, as opposed to daily or standard cleaning, for that area. In a like manner, the user selects area 22306 and turns on a mopping function for that area. The remaining area 22307 is treated in a default manner. Additional to adjusting the perimeter lines of the two-dimensional map 22304, the user can create boundaries anywhere, regardless of whether an actual perimeter exists in the environment. In the example shown, the perimeter line in the corner 308 has been redrawn to exclude the area near the corner. The robot will thus avoid entering this area. This may be useful for keeping the robot out of certain areas, such as areas with fragile objects, pets, cables or wires, etc.

In some embodiments, setting a cleaning mode includes, for example, setting a service condition, a service type, a service parameter, a service schedule, or a service frequency for all or different areas of the environment. A service condition indicates whether an area is to be serviced or not, and embodiments determine whether to service an area based on a specified service condition in memory. Thus, a regular service condition indicates that the area is to be serviced in accordance with service parameters like those described below. In contrast, a no service condition indicates that the area is to be excluded from service (e.g., cleaning). A service type indicates what kind of cleaning is to occur. For example, a hard (e.g. non-absorbent) surface may receive a mopping service (or vacuuming service followed by a mopping service in a service sequence), while a carpeted service may receive a vacuuming service. Other services can include a UV light application service, and a sweeping service. A service parameter may indicate various settings for the robot. In some embodiments, service parameters may include, but are not limited to, an impeller speed parameter, a wheel speed parameter, a brush speed parameter, a sweeper speed parameter, a liquid dispensing speed parameter, a driving speed parameter, a driving direction parameter, a movement pattern parameter, a cleaning intensity parameter, and a timer parameter. Any number of other parameters can be used without departing from embodiments disclosed herein, which is not to suggest that other descriptions are limiting. A service schedule indicates the day and, in some cases, the time to service an area, in some embodiments. For example, the robot may be set to service a particular area on Wednesday at noon. In some instances, the schedule may be set to repeat. A service frequency indicates how often an area is to be serviced. In embodiments, service frequency parameters can include hourly frequency, daily frequency, weekly frequency, and default frequency. A service frequency parameter can be useful when an area is frequently used or, conversely, when an area is lightly used. By setting the frequency, more efficient overage of environments is achieved. In some embodiments, the robot cleans areas of the environment according to the cleaning mode settings.

In some embodiments, the processor of the robot determines or changes the cleaning mode settings based on collected sensor data. For example, the processor may change a service type of an area from mopping to vacuuming upon detecting carpeted flooring from sensor data (e.g., in response to detecting an increase in current draw by a motor driving wheels of the robot, or in response to a visual odometry sensor indicating a different flooring type). In a further example, the processor may change service condition of an area from no service to service after detecting accumulation of debris in the area above a threshold. Examples of methods for a processor to autonomously adjust settings (e.g., speed) of components of a robot (e.g., impeller motor, wheel motor, etc.) based on environmental characteristics (e.g., floor type, room type, debris accumulation, etc.) are described in U.S. patent application Ser. Nos. 16/163,530 and 16/239,410, the entire contents of which are hereby incorporated by reference. In some embodiments, the user adjusts the settings chosen by the processor using the user interface. In some embodiments, the processor changes the cleaning mode settings and/or cleaning path such that resources required for cleaning are not depleted during the cleaning session. In some instances, the processor uses a bin packing algorithm or an equivalent algorithm to maximize the area cleaned given the limited amount of resources remaining. In some embodiments, the processor analyzes sensor data of the environment before executing a service type to confirm environmental conditions are acceptable for the service type to be executed. For example, the processor analyzes floor sensor data to confirm floor type prior to providing a particular service type. In some instances, wherein the processor detects an issue in the settings chosen by the user, the processor sends a message that the user retrieves using the user interface. The message in other instances may be related to cleaning or the map. For example, the message may indicate that an area with no service condition has high (e.g., measured as being above a predetermined or dynamically determined threshold) debris accumulation and should therefore have service or that an area with a mopping service type was found to be carpeted and therefore mopping was not performed. In some embodiments, the user overrides a warning message prior to the robot executing an action. In some embodiments, conditional cleaning mode settings may be set using a user interface and are provided to the processor of the robot using a wireless communication channel. Upon detecting a condition being met, the processor implements particular cleaning mode settings (e.g., increasing impeller motor speed upon detecting dust accumulation beyond a specified threshold or activating mopping upon detecting a lack of motion). In some embodiments, conditional cleaning mode settings are preset or chosen autonomously by the processor of the robot.

FIGS. 108A and 108B illustrate an example of changing perimeter lines of a map based on user inputs via a graphical user interface, like on a touchscreen. FIG. 108A depicts an overhead view of an environment 22400. This view shows the actual obstacles of environment 22400. The outer line 22401 represents the walls of the environment 22400 and the rectangle 22402 represents a piece of furniture. Commercial use cases are expected to be substantially more complex, e.g., with more than 2, 5, or 10 obstacles, in some cases that vary in position over time. FIG. 108B illustrates an overhead view of a two-dimensional map 22410 of the environment 22400 created by a processor of a robot using environmental sensor data. Because the methods for generating the map are often not 100% accurate, the two-dimensional map 22410 may be approximate. In some instances, performance of the robot may suffer as a result of imperfections in the generated map 22410. In some embodiments, a user corrects the perimeter lines of map 22410 to match the actual obstacles and boundaries of environment 22400. In some embodiments, the user is presented with a user interface displaying the map 22410 of the environment 22400 on which the user may add, delete, and/or otherwise adjust perimeter lines of the map 22410. For example, the processor of the robot may send the map 22410 to an application of a communication device wherein user input indicating adjustments to the map are received through a user interface of the application. The input triggers an event handler that launches a routine by which a perimeter line of the map is added, deleted, and/or otherwise adjusted in response to the user input, and an updated version of the map may be stored in memory before being transmitted back to the processor of the robot. For instance, in map 22410, the user manually corrects perimeter line 22416 by drawing line 22418 and deleting perimeter line 22416 in the user interface. In some cases, user input to add a line may specify endpoints of the added line or a single point and a slope. Some embodiments may modify the line specified by inputs to “snap” to likely intended locations. For instance, inputs of line endpoints may be adjusted by the processor to equal a closest existing line of the map. Or a line specified by a slope and point may have endpoints added by determining a closest intersection relative to the point of the line with the existing map. In some cases, the user may also manually indicate with portion of the map to remove in place of the added line, e.g., separately specifying line 22418 and designating curvilinear segment 22416 for removal. Or some embodiments may programmatically select segment 22416 for removal in response to the user inputs designating line 22418, e.g., in response to determining that areas 22416 and 22418 bound areas of less than a threshold size, or by determining that line 22416 is bounded on both sides by areas of the map designated as part of the environment.

In some embodiments, the application suggests a correcting perimeter. For example, embodiments may determine a best-fit polygon of a perimeter of the (as measured) map through a brute force search or some embodiments may suggest a correcting perimeter with a Hough Transform, the Ramer-Douglas-Peucker algorithm, the Visvalingam algorithm, or other line-simplification algorithm. Some embodiments may determine candidate suggestions that do not replace an extant line but rather connect extant segments that are currently unconnected, e.g., some embodiments may execute a pairwise comparison of distances between endpoints of extant line segments and suggest connecting those having distances less than a threshold distance apart. Some embodiments may select, from a set of candidate line simplifications, those with a length above a threshold or those with above a threshold ranking according to line length for presentation. In some embodiments, presented candidates may be associated with event handlers in the user interface that cause the selected candidates to be applied to the map. In some cases, such candidates may be associated in memory with the line segments they simplify, and the associated line segments that are simplified may be automatically removed responsive to the event handler receive a touch input event corresponding to the candidate. For instance, in map 22410, in some embodiments, the application suggests correcting perimeter line 22412 by displaying suggested correction 22414. The user accepts the corrected perimeter line 22414 that will replace and delete perimeter line 22412 by supplying inputs to the user interface. In some cases, where perimeter lines are incomplete or contain gaps, the application suggests their completion. For example, the application suggests closing the gap 22420 in perimeter line 22422. Suggestions may be determined by the robot, the application executing on the communication device, or other services, like a cloud-based service or computing device in a base station.

Perimeter lines can be edited in a variety of ways such as, for example, adding, deleting, trimming, rotating, elongating, redrawing, moving (e.g., upward, downward, leftward, or rightward), suggesting a correction, and suggesting a completion to all or part of the perimeter line. In some embodiments, the application suggests an addition, deletion or modification of a perimeter line and in other embodiments the user manually adjusts perimeter lines by, for example, elongating, shortening, curving, trimming, rotating, translating, flipping, etc. the perimeter line selected with their finger or buttons or a cursor of the communication device or by other input methods. In some embodiments, the user deletes all or a portion of the perimeter line and redraws all or a portion of the perimeter line using drawing tools, e.g., a straight-line drawing tool, a Bezier tool, a freehand drawing tool, and the like. In some embodiments, the user adds perimeter lines by drawing new perimeter lines. In some embodiments, the application identifies unlikely boundaries created (newly added or by modification of a previous perimeter) by the user using the user interface. In some embodiments, the application identifies one or more unlikely perimeter segments by detecting one or more perimeter segments oriented at an unusual angle (e.g., less than 25 degrees relative to a neighboring segment or some other threshold) or one or more perimeter segments comprising an unlikely contour of a perimeter (e.g., short perimeter segments connected in a zig-zag form). In some embodiments, the application identifies an unlikely perimeter segment by determining the surface area enclosed by three or more connected perimeter segments, one being the newly created perimeter segment and identifies the perimeter segment as an unlikely perimeter segment if the surface area is less than a predetermined (or dynamically determined) threshold. In some embodiments, other methods are used in identifying unlikely perimeter segments within the map. In some embodiments, the user interface may present a warning message using the user interface, indicating that a perimeter segment is likely incorrect. In some embodiments, the user ignores the warning message or responds by correcting the perimeter segment using the user interface.

In some embodiments, the application autonomously suggests a correction to perimeter lines by, for example, identifying a deviation in a straight perimeter line and suggesting a line that best fits with regions of the perimeter line on either side of the deviation (e.g. by fitting a line to the regions of perimeter line on either side of the deviation). In other embodiments, the application suggests a correction to perimeter lines by, for example, identifying a gap in a perimeter line and suggesting a line that best fits with regions of the perimeter line on either side of the gap. In some embodiments, the application identifies an end point of a line and the next nearest end point of a line and suggests connecting them to complete a perimeter line. In some embodiments, the application only suggests connecting two end points of two different lines when the distance between the two is below a particular threshold distance. In some embodiments, the application suggests correcting a perimeter line by rotating or translating a portion of the perimeter line that has been identified as deviating such that the adjusted portion of the perimeter line is adjacent and in line with portions of the perimeter line on either side. For example, a portion of a perimeter line is moved upwards or downward or rotated such that it is in line with the portions of the perimeter line on either side. In some embodiments, the user may manually accept suggestions provided by the application using the user interface by, for example, touching the screen, pressing a button or clicking a cursor. In some embodiments, the application may automatically make some or all of the suggested changes.

In some embodiments, maps are represented in vector graphic form or with unit tiles, like in a bitmap. In some cases, changes may take the form of designating unit tiles via a user interface to add to the map or remove from the map. In some embodiments, bitmap representations may be modified (or candidate changes may be determined) with, for example, a two-dimensional convolution configured to smooth edges of mapped environment areas (e.g., by applying a Gaussian convolution to a bitmap with tiles having values of 1 where the environment is present and 0 where the environment is absent and suggesting adding unit tiles with a resulting score above a threshold). In some cases, the bitmap may be rotated to align the coordinate system with walls of a generally rectangular room, e.g., to an angle at which a diagonal edge segments are at an aggregate minimum. Some embodiments may then apply a similar one-dimensional convolution and thresholding along the directions of axes of the tiling, but applying a longer stride than the two-dimensional convolution to suggest completing likely remaining wall segments.

Reference to operations performed on “a map” may include operations performed on various representations of the map. For instance, the robot may store in memory a relatively high-resolution representation of a map, and a lower-resolution representation of the map may be sent to a communication device for editing. In this scenario, the edits are still to “the map,” notwithstanding changes in format, resolution, or encoding. Similarly, a map stored in memory of the robot, while only a portion of the map may be sent to the communication device, and edits to that portion of the map are still properly understood as being edits to “the map” and obtaining that portion is properly understood as obtaining “the map.” Maps may be said to be obtained from a robot regardless of whether the maps are obtained via direct wireless connection between the robot and a communication device or obtained indirectly via a cloud service. Similarly, a modified map may be said to have been sent to the robot even if only a portion of the modified map, like a delta from a previous version currently stored on the robot, it sent.

In some embodiments, the user interface may present a map, e.g., on a touchscreen, and areas of the map (e.g., corresponding to rooms or other sub-divisions of the environment, e.g., collections of contiguous unit tiles in a bitmap representation) in pixel-space of the display may be mapped to event handlers that launch various routines responsive to events like an on-touch event, a touch release event, or the like. In some cases, before or after receiving such a touch event, the user interface may present the user with a set of user-interface elements by which the user may instruct embodiments to apply various commands to the area. Or in some cases, the areas of a working environment are depicted in the user interface without also depicting their spatial properties, e.g., as a grid of options without conveying their relative size or position.

Examples of commands specified via the user interface include assigning an operating mode to an area, e.g., a cleaning mode or a mowing mode. Modes may take various forms. Examples include modes that specify how a robot performs a function, like modes that select which tools to apply and settings of those tools. Other examples include modes that specify target results, e.g., a “heavy clean” mode versus a “light clean” mode, a quite vs loud mode, or a slow versus fast mode. In some cases, such modes may be further associated with scheduled times in which operation subject to the mode is to be performed in the associated area. In some embodiments, a given area may be designated with multiple modes, e.g., a vacuuming mode and a quite mode. In some cases, modes are nominal properties, ordinal properties, or cardinal properties, e.g., a vacuuming mode, a heaviest-clean mode, a 10/seconds/linear-foot vacuuming mode, respectively.

Examples of commands specified via the user interface include commands that schedule when modes of operations are to be applied to areas. Such scheduling may include scheduling when cleaning is to occur or when cleaning using a designed mode is to occur. Scheduling may include designating a frequency, phase, and duty cycle of cleaning, e.g., weekly, on Monday at 4, for 45 minutes. Scheduling, in some cases, may include specifying conditional scheduling, e.g., specifying criteria upon which modes of operation are to be applied. Examples include events in which no motion is detected by a motion sensor of the robot or a base station for more than a threshold duration of time, or events in which a third-party API (that is polled or that pushes out events) indicates certain weather events have occurred, like rain. In some cases, the user interface exposes inputs by which such criteria may be composed by the user, e.g., with Boolean connectors, for instance “If no-motion-for-45-minutes, and raining, then apply vacuum mode in area labeled “kitchen.”

In some embodiments, the user interface may display information about a current state of the robot or previous states of the robot or its environment. Examples include a heat map of dirt or debris sensed over an area, visual indications of classifications of floor surfaces in different areas of the map, visual indications of a path that the robot has taken during a current cleaning session or other type of work session, visual indications of a path that the robot is currently following and has computed to plan further movement in the future, and visual indications of a path that the robot has taken between two points in the environment, like between a point A and a point B on different sides of a room or a house in a point-to-point traversal mode. In some embodiments, while or after a robot attains these various states, the robot may report information about the states to the application via a wireless network, and the application may update the user interface on the communication device to display the updated information. For example, in some cases, a processor of a robot may report which areas of the working environment have been covered during a current working session, for instance, in a stream of data to the application executing on the communication device formed via a WebRTC Data connection, or with periodic polling by the application, and the application executing on the computing device may update the user interface to depict which areas of the working environment have been covered. In some cases, this may include depicting a line of a path traced by the robot or adjusting a visual attribute of areas or portions of areas that have been covered, like color or shade or areas or boundaries. In some embodiments, the visual attributes may be varied based upon attributes of the environment sensed by the robot, like an amount of dirt or a classification of a flooring type since by the robot. In some embodiments, a visual odometer implemented with a downward facing camera may capture images of the floor, and those images of the floor, or a segment thereof, may be transmitted to the application to apply as a texture in the visual representation of the working environment in the map, for instance, with a map depicting the appropriate color of carpet, wood floor texture, tile, or the like to scale in the different areas of the working environment.

In some embodiments, the user interface may indicate in the map a path the robot is about to take (e.g., according to a routing algorithm) between two points, to cover an area, or to perform some other task. For example, a route may be depicted as a set of line segments or curves overlaid on the map, and some embodiments may indicate a current location of the robot with an icon overlaid on one of the line segments with an animated sequence that depicts the robot moving along the line segments. In some embodiments, the future movements of the robot or other activities of the robot may be depicted in the user interface. For example, the user interface may indicate which room or other area the robot is currently covering and which room or other area the robot is going to cover next in a current work sequence. The state of such areas may be indicated with a distinct visual attribute of the area, its text label, or its perimeters, like color, shade, blinking outlines, and the like. In some embodiments, a sequence with which the robot is currently programmed to cover various areas may be visually indicated with a continuum of such visual attributes, for instance, ranging across the spectrum from red to blue (or dark grey to light) indicating sequence with which subsequent areas are to be covered.

In some embodiments, via the user interface or automatically without user input, a starting and an ending point for a path to be traversed by the robot may be indicated on the user interface of the application executing on the communication device. Some embodiments may depict these points and propose various routes therebetween, for example, with various routing algorithms like those described in the applications incorporated by reference herein. Examples include A*, Dijkstra's algorithm, and the like. In some embodiments, a plurality of alternate candidate routes may be displayed (and various metrics thereof, like travel time or distance), and the user interface may include inputs (like event handlers mapped to regions of pixels) by which a user may select among these candidate routes by touching or otherwise selecting a segment of one of the candidate routes, which may cause the application to send instructions to the robot that cause the robot to traverse the selected candidate route.

In some embodiments, the map formed by the processor of the robot during traversal of the working environment may have various artifacts like those described herein. Using techniques like the line simplification algorithms and convolution will smoothing and filtering, some embodiments may remove clutter from the map, like artifacts from reflections or small objects like chair legs to simplify the map, or a version thereof in lower resolution to be depicted on a user interface of the application executed by the communication device. In some cases, this may include removing duplicate borders, for instance, by detecting border segments surrounded on two sides by areas of the working environment and removing those segments.

Some embodiments may rotate and scale the map for display in the user interface. In some embodiments, the map may be scaled based on a window size such that a largest dimension of the map in a given horizontal or vertical direction is less than a largest dimension in pixel space of the window size of the communication device or a window thereof in which the user interfaces displayed. Or in some embodiments, the map may be scaled to a minimum or maximum size, e.g., in terms of a ratio of meters of physical space to pixels in display space. Some embodiments may include zoom and panning inputs in the user interface by which a user may zoom the map in and out, adjusting scaling, and pan to shifts which portion of the map is displayed in the user interface.

In some embodiments, rotation of the map or portions thereof (like perimeter lines) may be determined with techniques like those described above by which an orientation that minimizes an amount of aliasing, or diagonal lines of pixels on borders, is minimized. Or borders may be stretched or rotated to connect endpoints determined to be within a threshold distance. In some embodiments, an optimal orientation may be determined over a range of candidate rotations that is constrained to place a longest dimension of the map aligned with a longest dimension of the window of the application in the communication device. Or in some embodiments, the application may query a compass of the communication device to determine an orientation of the communication device relative to magnetic north and orient the map in the user interface such that magnetic north on the map as displayed is aligned with magnetic north as sensed by the communication device. In some embodiments, the robot may include a compass and annotate locations on the map according to which direction is magnetic north.

In some embodiments, a user may use the application to instruct the robot to begin performing work (e.g., vacuuming or mopping) immediately. In some embodiments, the application displays a battery level or charging status of the robot. In some embodiments, the amount of time left until full charge or a charge required to complete the remaining of a work session may be displayed to the user using the application. In some embodiments, the amount of work by the robot a remaining battery level can provide may be displayed. In some embodiments, the amount of time remaining to finish a task may be displayed. In some embodiments, the user may use the application to instruct the robot to clean all areas of the map. In some embodiments, the user may use the application to instruct the robot to clean particular areas within the map, either immediately or at a particular day and time. In some embodiments, the user may choose a schedule of the robot, including a time, a day, a frequency (e.g., daily, weekly, bi-weekly, monthly, or other customization), and areas within which to perform a task. In some embodiments, the user may choose the type of task. In some embodiments, the user may use the application to choose cleaning preferences, such as detailed or quiet clean, a suction power, light or deep cleaning, and the number of passes. The cleaning preferences may be set for different areas or may be chosen for a particular work session during scheduling. In some embodiments, the user may use the application to instruct the robot to return to a charging station for recharging if the battery level is low during a work session, then to continue the task. In some embodiments, the user may view history reports using the application, including total time of cleaning and total area covered (per work session or historically), total charging time per session or historically, number of bin empties, and total number of work sessions. In some embodiments, the user may use the application to view areas covered in the map during a work session. In some embodiments, the user may use the application to add information such as floor type, debris accumulation, room name, etc. to the map. In some embodiments, the user may use the application to view a current, previous, or planned path of the robot. In some embodiments, the user may use the application to create zones by adding dividers to the map that divide the map into two or more zones. In some embodiments, the user may use the application to change a status of the robot to do not disturb, wherein the robot is prevented from cleaning or enacting other actions that may disturb the user.

In some embodiments, more than one robot may be connected to the application and the user may choose settings for the robots using the application. In some embodiments, the user may choose that one robot perform a task after another robot completes a task. In some embodiments, the user may choose schedules of both robots using the application. In some embodiments, the schedule of both robots may overlap (e.g., same time and day). In some embodiments, a home assistant may be connected to the application. In some embodiments, the user may provide commands to the robot via a home assistant by verbally providing commands to the home assistant which may then be transmitted to the robot. Examples of commands include commanding the robot to clean a particular area or to navigate to a particular area or to turn on and start cleaning. In some embodiments, the application may connect with other smart devices (e.g., smart appliances such as smart fridge or smart TV) within the environment and the user may communicate with the robot via the smart devices.

Other methods and techniques (e.g., mapping, localization, path planning, zone division, etc.) that may be used are described in U.S. patent application Ser. Nos. 16/230,805, 16/389,797, 16/427,317, and 16/509,099, the entire contents of which are hereby incorporated by reference. 

The invention claimed is:
 1. A robot, comprising: a chassis; a set of wheels coupled to the chassis; at least one encoder coupled to a wheel with a resolution of at least one count for every ninety degree rotation of the wheel; a trailing arm suspension coupled to each drive wheel for overcoming surface transitions and obstacles, wherein a first suspension arm is positioned on a right side of a right drive wheel and a second suspension arm is positioned on a left side of a left drive wheel; a roller brush; a collection bin for storing dust and debris collected from a surface; a fan with multiple blades for creating a negative pressure resulting in suction of the dust and debris from the surface; a network card for wireless communication with at least one of: a computing device, a charging station, and another robot; a plurality of sensors; a processor; and a non-transitory, machine-readable media storing instructions that when executed by the processor effectuates operations, configured to: establishing, with the processor, a connection with a wireless router during an initial setup of the robot; obtaining, with the processor, a network address from the wireless router during the initial setup of the robot and a renewed network address at intervals determined by the wireless router; establishing, with the processor, a connection with at least one of: the computing device, the charging station, and the another robot; capturing, with at least one sensor, spatial data of an environment of the robot and movement data of the robot; generating or updating, with the processor, a map of the environment based on at least some of the spatial data and at least some of the movement data, comprising: aligning, with the processor, the at least some of the spatial data captured within different fields of view based on overlap between the at least some of the spatial data captured within the different fields of view; determining, with the processor, a movement distance and a movement direction of the robot from a first position of the robot to a second position of the robot based on at least some of the movement data and data from the at least one encoder; quantizing, with the processor, the map into a collection of cells; assigning, with the processor, at least one value to at least one cell of the map indicating at least one of: a traversability of the at least one cell and coverage of the at least one cell, wherein the traversability is determined based on local sensor data and the coverage indicates whether the at least one cell has been covered by the robot; updating, with the processor, the at least one value of the at least one cell based on data captured by at least one sensor positioned along a perimeter of the robot or on a bottom of the robot as the robot moves in real time; dividing, with the processor, the map into two or more zones; storing, with the processor, at least part of the map in a memory accessible to the processor during a subsequent work session; transmitting, with the processor, the map to an application of a computing device, wherein the application displays a perception of the map; transmitting, with the processor, at least some information to the cloud; and fine tuning, with the processor, the map based on data captured by a structured light depth sensor positioned on the robot with a field of view complementary to a field of view of a camera positioned on the robot.
 2. The robot of claim 1, wherein the operations further comprise: capturing, with a camera, images of the environment; detecting, with the processor, a pattern in a derivative of the images of the environment; determining, with the processor, a reference of the robot with respect to a coordinate frame of the environment based on the pattern in the derivative of the images; ignoring, with the processor, the spatial data captured while the robot traverses previously covered areas of the map as the robot moves from one area to another; and updating, with the processor, the map based on the reference of the robot with respect to the coordinate frame of the environment and the ignored spatial data.
 3. The robot of claim 1, wherein the robot communicates with the computing device, the charging station, or the another robot in the local area network or a wide area network.
 4. The robot of claim 1, wherein generating or updating the map further comprises: removing, with the processor, at least some overlapping spatial data point from the map.
 5. The robot of claim 1, wherein the operations further comprise: actuating, with a control system, movement of the robot along a trajectory of polymorphic instantiations that collectively form a boustrophedon path by applying pulsed electricity to at least one electric motor of the set of wheels.
 6. The robot of claim 1, wherein the operations further comprise: simulating, with the processor, possible locations of the robot using an ensemble; and choosing, with the processor, one element of the ensemble as a new location of the robot based on an assessment of sensor data captured in real time indicative of a location of the robot with respect to the coordinate frame of the environment.
 7. The robot of claim 1, wherein at least some of the movement data is captured by a movement sensor that optically measures the displacement of the robot on a surface by transmitting a wavelength of light in or near the infrared spectrum.
 8. The robot of claim 1, wherein the application of the computing device is configured to execute at least one of: receiving a user input designating at least one of: an amount of surface coverage by the robot before the robot returns to a charging station and an amount of surface coverage or volume of debris collected by the robot before the robot empties the collection bin; and displaying areas covered by the robot in real time.
 9. The robot of claim 1, wherein the robot empties the collection bin based on a frequency a user prefers the collection bin to be emptied.
 10. The robot of claim 1, wherein the robot returns to a charging station after at least one of: a default amount of surface coverage is completed and a default volume of debris is collected.
 11. The robot of claim 1, wherein the collection bin is emptied manually or automatically.
 12. The robot of claim 1, wherein the charging station is a built-in charging station or a portable charging station.
 13. The robot of claim 1, wherein the plurality of sensors comprises at least some sensors that are silent activators.
 14. The robot of claim 1, wherein the charging station and the robot wirelessly communicate using a radio frequency of 2.4 or 5 GHz.
 15. The robot of claim 1, wherein the network card encapsulates a payload including information or commands within a framework having a header with at least a specific number that uniquely identifies the network card.
 16. The robot of claim 1, wherein the initial setup of the robot and discovery of available wireless routers is enhanced by Bluetooth capabilities of the network card.
 17. The robot of claim 1, wherein a data packet comprising a payload including commands or information and a header are sent by and between at least two of: the robot, the computing device, the charging station, and the another robot.
 18. The robot of claim 17, wherein the header includes a checksum that is read by a receiving device to confirm that the payload is intact.
 19. The robot of claim 17, wherein at least one of: the robot, the computing device, the charging station, and the another robot are in a local area network or on the cloud. 